code: def _get_native_function_from_yaml(
      yaml_obj: Dict[str, object]
  ) -> NativeFunction:
      native_function, _ = NativeFunction.from_yaml(
          yaml_obj,
          loc=Location(__file__, 1),
          valid_tags=set(),
      )
      return native_function
  
imports: import tempfile
  import unittest
  from typing import Any, Dict
  from unittest.mock import ANY, Mock, patch
  import expecttest
  import torchgen
  from torchgen.executorch.api.custom_ops import ComputeNativeFunctionStub
  from torchgen.executorch.model import ETKernelIndex
  from torchgen.gen_executorch import gen_headers
  from torchgen.model import Location, NativeFunction
  from torchgen.selective_build.selector import SelectiveBuilder
  from torchgen.utils import FileManager
label_desc: Use image node_id 1 for calling a global function with example usage: _get_native_function_from_yaml(yaml_obj) and returns: native_function