code: def _findNode(parent, name, debug_name=None, parse=None):
      if debug_name is None:
          debug_name = name
  
      result = parent.find(name)
      if result is None:
          raise ValueError("missing element '{}'".format(debug_name))
      if parse is not None:
          try:
              return parse(result.text)
          except ValueError as e:
              raise_from(
                  ValueError(
                      "illegal value for '{}': {}".format(debug_name, e)
                  ),
                  None,
              )
      return result
  
imports: from ..preprocessing.generator import Generator
  from ..utils.image import read_image_bgr
  import os
  import numpy
  from six import raise_from
  from PIL import Image
label_desc: Use image node_id 1 for calling a global function with example usage: _findNode(parent, name, debug_name, parse) and returns: result, parse