code: def test__dict_to_numpy_array1(self):
      d = {"a": 1, "b": 2}
      a = _dict_to_numpy_array1(d, mapping={"a": 0, "b": 1})
      np.testing.assert_allclose(a, np.array([1, 2]))
      a = _dict_to_numpy_array1(d, mapping={"b": 0, "a": 1})
      np.testing.assert_allclose(a, np.array([2, 1]))
  
      a = _dict_to_numpy_array1(d)
      np.testing.assert_allclose(a.sum(), 3)
  
imports: import random
  from copy import copy
  import pytest
  import networkx
  from networkx.utils import PythonRandomInterface, arbitrary_element, create_py_random_state, create_random_state, dict_to_numpy_array, discrete_sequence, flatten, groups, make_list_of_ints, pairwise, powerlaw_sequence
  from networkx.utils.misc import _dict_to_numpy_array1, _dict_to_numpy_array2
label_desc: Use image node_id 3 for calling the TestNumpyArray obj's underlying member method code with example usage: obj.test__dict_to_numpy_array1() without return types