code: def test_to_numpy_array_arbitrary_weights():
      G = nx.DiGraph()
      w = 922337203685477580102  # Out of range for int64
      G.add_edge(
          0, 1, weight=922337203685477580102
      )  # val not representable by int64
      A = nx.to_numpy_array(G, dtype=object)
      expected = np.array([[0, w], [0, 0]], dtype=object)
      npt.assert_array_equal(A, expected)
  
      # Undirected
      A = nx.to_numpy_array(G.to_undirected(), dtype=object)
      expected = np.array([[0, w], [w, 0]], dtype=object)
      npt.assert_array_equal(A, expected)
  
imports: import pytest
  import networkx
  from networkx.generators.classic import barbell_graph, cycle_graph, path_graph
  from networkx.utils import graphs_equal
label_desc: Use image node_id 5 for calling a global function with example usage: test_to_numpy_array_arbitrary_weights() without return types