code: def _count_edges(ei):
      if type(ei) is list:
          c = 0
          for eik in ei:
              c += eik.shape[0]
      else:
          c = ei.shape[0]
      return c
  
file_path: deepgraph/deepgraph/iterators_and_indexers.py
imports: from datetime import datetime
  from itertools import chain
  import numpy
  import pandas
  from deepgraph._triu_indices import _triu_indices, _union_of_indices, _reduce_triu_indices
  from deepgraph.connector_selector_implementations import _ft_connector, _ft_selector
  from deepgraph.connectors_and_selectors import CreatorFunction, Selector, Connector
  from deepgraph.utils import _flatten, _is_array_like, _merge_dicts
label_desc: Use image node_id 2 for calling a global function with example usage: _count_edges(ei) and returns: c