<｜begin▁of▁sentence｜>### Instruction:
Imagine you're overseeing a hydroponic system, and you've designed a network to monitor water flow between your plant beds. In this network, each plant bed is represented as a node, and the tubes connecting the beds as edges. Now, certain beds have been set up with a recirculating flow—meaning there are tubes that loop water back into the same bed, which we'll represent as self-loops in our network graph.

Suppose the configuration of your system is captured in a visual diagram—a graph with nodes representing your plant beds, some of which might have a self-loop to indicate a recirculating setup. If we have a set of connections like [(1, 1), (1, 2)], with the first pair representing a self-loop in bed 1, how might we identify all such beds that have this recirculating feature using NetworkX? Consider this scenario as you think about querying the graph for nodes with self-loops, ensuring your crops get the precise irrigation they need.
### Response:
import networkx as nx

# Create a graph
G = nx.Graph()
# Add edges, including a self-loop
G.add_edge(1, 1)
G.add_edge(1, 2)

# Get a list of nodes with self loops
nodes_with_loops = list(nx.nodes_with_selfloops(G))
print('Nodes with self-loops:', nodes_with_loops)
<|EOT|>
