code: def test_fm_writes_custom_ops_header_when_boolean_is_true(
      self, unused: Mock, mock_method: Mock
  ) -> None:
      with tempfile.TemporaryDirectory() as tempdir:
          fm = FileManager(tempdir, tempdir, False)
          gen_headers(
              native_functions=[],
              gen_custom_ops_header=True,
              custom_ops_native_functions=[],
              selector=SelectiveBuilder.get_nop_selector(),
              kernel_index=ETKernelIndex(index={}),
              cpu_fm=fm,
              use_aten_lib=False,
          )
          mock_method.assert_called_once_with(
              "CustomOpsNativeFunctions.h", "NativeFunctions.h", ANY
          )
  
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 the TestGenCustomOpsHeader obj's underlying member method code with example usage: obj.test_fm_writes_custom_ops_header_when_boolean_is_true(unused, mock_method) without return types