<｜begin▁of▁sentence｜>### Instruction:
Given a list of expected degrees [2, 3, 2.5, 3.5, 2, 1.5], can you generate a random graph without selfloops and with these expected degrees for each corresponding node using the NetworkX expected_degree_graph function?
### Response:
import networkx as nx

# Define the expected degrees
expected_degrees = [2, 3, 2.5, 3.5, 2, 1.5]

# Generate a random graph with the given expected degrees
G = nx.expected_degree_graph(expected_degrees, selfloops=False, seed=42)

# Verify the generated graph
print(G.edges())
print('Number of nodes:', G.number_of_nodes())
print('Number of edges:', G.number_of_edges())
<|EOT|>
