<｜begin▁of▁sentence｜>### Instruction:
Given two graphs, one with edges [(0, 1), (1, 2), (2, 0)] and another with edges [(0, 1), (1, 2), (2, 3), (3, 0)], along with vertex colors [1, 2, 1] for the first graph and [1, 2, 1, 2] for the second graph, and edge colors [1, 1, 1] for the first graph and [1, 1, 1, 1] for the second graph, how can you find all possible vertex-to-vertex mappings from the second graph to the first graph that are isomorphisms considering the colors?
### Response:
import igraph as ig

# Create two simple graphs
g1 = ig.Graph([(0, 1), (1, 2), (2, 0)])
g2 = ig.Graph([(0, 1), (1, 2), (2, 3), (3, 0)])

# Define optional color vectors for vertices and edges
color1 = [1, 2, 1]
color2 = [1, 2, 1, 2]
edge_color1 = [1, 1, 1]
edge_color2 = [1, 1, 1, 1]

# Find isomorphisms between g1 and g2 considering vertex and edge colors
isomorphisms = g1.get_isomorphisms_vf2(other=g2, color1=color1, color2=color2, edge_color1=edge_color1, edge_color2=edge_color2)

# Print isomorphisms
for iso in isomorphisms:
    print('Mapping from g2 to g1:', iso)
<|EOT|>
