<｜begin▁of▁sentence｜>### Instruction:
Given a simple triangle graph with edges [(0, 1), (1, 2), (2, 0)], can you create a valid planar embedding using NetworkX and verify its validity?
### Response:
import networkx as nx
from networkx.algorithms import planarity

# Create a graph
G = nx.Graph()
G.add_edges_from([(0, 1), (1, 2), (2, 0)])

# Initialize planar embedding
e = planarity.PlanarEmbedding()

# Add nodes in a planar embedding
for node in G.nodes():
    e.add_node(node)

# Add half edges in counterclockwise orientation
e.add_half_edge_ccw(0, 1, 2)
e.add_half_edge_ccw(1, 2, 0)
e.add_half_edge_ccw(2, 0, 1)

# Check if the structure is a valid planar embedding
e.is_valid()
print('Is the planar embedding valid?', e.is_valid())
<|EOT|>
