code: def _populate_number_fields(data_dict):
      """Returns a dict with the number fields N_NODE, N_EDGE filled in.
  
      The N_NODE field is filled if the graph contains a non-None NODES field;
      otherwise, it is set to 0.
      The N_EDGE field is filled if the graph contains a non-None RECEIVERS field;
      otherwise, it is set to 0.
  
      Args:
        data_dict: An input `dict`.
  
      Returns:
        The data `dict` with number fields.
      """
      dct = data_dict.copy()
      for number_field, data_field in [
          [N_NODE, NODES],
          [N_EDGE, RECEIVERS],
      ]:
          if dct.get(number_field) is None:
              if dct[data_field] is not None:
                  dct[number_field] = np.array(
                      np.shape(dct[data_field])[0], dtype=np.int32
                  )
              else:
                  dct[number_field] = np.array(0, dtype=np.int32)
      return dct
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  from graph_nets import graphs
  import networkx
  import numpy
  from six.moves import range
  from six.moves import zip
label_desc: Use image node_id 14 for calling a global function with example usage: _populate_number_fields(data_dict) and returns: dct