code: def __init__(
      self,
      fn,
      version=None,
      do_not_specialize=None,
      debug=None,
      noinline=None,
  ):
      do_not_specialize = do_not_specialize if do_not_specialize else []
  
      self.fn = fn
      self.module = fn.__module__
      self.version = version
      self.signature = inspect.signature(fn)
      self.do_not_specialize = do_not_specialize
      self.starting_line_number = inspect.getsourcelines(fn)[1]
  
      self.params = []
      for i, param in enumerate(self.signature.parameters.values()):
          dns = do_not_specialize and (
              i in do_not_specialize or param.name in do_not_specialize
          )
          self.params.append(KernelParam(i, param, dns))
  
      # function source code (without decorators)
      self.src = textwrap.dedent(inspect.getsource(fn))
      self.src = self.src[self.src.find("def") :]
      # cache of just-in-time compiled kernels
      self.cache = defaultdict(dict)
      self.hash = None
      # JITFunction can be instantiated as kernel
      # when called with a grid using __getitem__
      self.kernel = None
      self.debug = (
          True if os.environ.get("TRITON_DEBUG", "0") == "1" else debug
      )
      self.noinline = noinline
  
      # TODO(jlebar): Remove uses of these fields outside this file, then
      # remove the fields here.
      self.arg_names = [p.name for p in self.params]
      self.constexprs = [p.num for p in self.params if p.is_constexpr]
  
      # reuse docs of wrapped function
      self.__doc__ = fn.__doc__
      self.__name__ = fn.__name__
      self.__globals__ = fn.__globals__
      self.__module__ = fn.__module__
  
imports: from __future__ import annotations, division
  import ast
  import hashlib
  import inspect
  import os
  import textwrap
  from collections import defaultdict, namedtuple
  from functools import cached_property
  from typing import Callable, Generic, Iterable, List, Optional, TypeVar, Union, cast, overload
  from ..runtime.driver import driver
label_desc: Use image node_id 8 to create a new JITFunction object from inherited base classes: KernelInterface with example: obj = JITFunction(fn, version, do_not_specialize, debug, noinline)