code: def optional_has_element_reference_implementation(
      optional: Optional[np.ndarray],
  ) -> np.ndarray:
      if optional is None:
          return np.array(False)
      else:
          return np.array(True)
  
file_path: onnx/onnx/backend/test/case/node/optionalhaselement.py
imports: from typing import Optional
  import numpy
  import onnx
  from onnx.backend.test.case.base import Base
  from onnx.backend.test.case.node import expect
label_desc: Use image node_id 1 for calling a global function with example usage: optional_has_element_reference_implementation(optional) and returns: np, np