<｜begin▁of▁sentence｜>### Instruction:
Imagine you are tasked with ensuring the stability and streamlined design of a new vehicle's electrical system, which can be represented as a network of connections (akin to circuits) between various electrical components. To mimic the simplicity and non-redundancy of a tree structure in nature, you aim to verify that the layout of these connections does not contain any loops or redundant paths.

To do so, you've digitally mapped the connections in a schematic, where each component is a node and the wires between them are the edges. In this schematic diagram, the connections are as follows: there are wires running from component 1 to components 2 and 3, and from component 2 to components 4 and 5.

The task at hand is to use NetworkX's 'is_tree' function to examine the described wiring diagram and conclude whether the design of this vehicle's electrical system follows a tree-like structure, ensuring no loops or unnecessary complexity exists within the network.
### Response:
import networkx as nx

G = nx.Graph()
G.add_edges_from([(1, 2), (1, 3), (2, 4), (2, 5)])

# Check if G is a tree
is_tree = nx.is_tree(G)
print('Is G a tree?', is_tree)
<|EOT|>
