<｜begin▁of▁sentence｜>### Instruction:
As a prosthetist, imagine you're creating a digital model that represents the path followed by electrical signals in an artificial limb. This model is akin to a pathway constructed using the 'nx.path_graph(4)' function - establishing a simple, unidirectional connection between each node, akin to the joints and sensors within the prosthetic.

In addition, within this network, you've precisely configured a specific signal route between two components, let's say from sensor 1 to actuator 2, akin to adding an edge with 'H.add_edge(1, 2, weight=1)'. Here, the "weight" represents the strength or capacity of the signal much like the voltage or resistance within a circuit would.

In this scenario, the question revolves around verifying the complexity of your signal pathways. How do you determine if your overall signal map constitutes these weighted connections, or how would you investigate if a distinct signal route between any two components (like the one between sensor 1 and actuator 2) carries this defined weight? The method in question within your modeling toolkit is the 'is_weighted' function from NetworkX which will help in assessing these attributes.
### Response:
import networkx as nx

# Create a graph
G = nx.path_graph(4)

# Check if the graph is weighted
print(nx.is_weighted(G))
# Output: False

# Check if a specific edge is weighted
print(nx.is_weighted(G, (2, 3)))
# Output: False

# Create a directed graph with a weighted edge
H = nx.DiGraph()
H.add_edge(1, 2, weight=1)

# Check if the directed graph is weighted
print(nx.is_weighted(H))
# Output: True
<|EOT|>
