parameters: (self, fn, sig, _firstcall=True)
docstring: Return the implementation of function *fn* for signature *sig*.
          The return value is a callable with the signature (builder, args).
docstring_summary: Return the implementation of function *fn* for signature *sig*.
          The return value is a callable with the signature (builder, args).
docstring_tokens: Return the implementation of function * fn * for signature * sig * . The return value is a callable with the signature ( builder args ) .
function: def get_function(self, fn, sig, _firstcall=True):
          """
          Return the implementation of function *fn* for signature *sig*.
          The return value is a callable with the signature (builder, args).
          """
          assert sig is not None
          sig = sig.as_function()
          if isinstance(fn, (types.Function, types.BoundFunction,
                             types.Dispatcher)):
              key = fn.get_impl_key(sig)
              overloads = self._defns[key]
          else:
              key = fn
              overloads = self._defns[key]
  
          try:
              return _wrap_impl(overloads.find(sig.args), self, sig)
          except NotImplementedError:
              pass
          if isinstance(fn, types.Type):
              # It's a type instance => try to find a definition for the type class
              try:
                  return self.get_function(type(fn), sig)
              except NotImplementedError:
                  # Raise exception for the type instance, for a better error message
                  pass
  
          # Automatically refresh the context to load new registries if we are
          # calling the first time.
          if _firstcall:
              self.refresh()
              return self.get_function(fn, sig, _firstcall=False)
  
          raise NotImplementedError("No definition for lowering %s%s" % (key, sig))
function_tokens: def get_function ( self , fn , sig , _firstcall = True ) : assert sig is not None sig = sig . as_function ( ) if isinstance ( fn , ( types . Function , types . BoundFunction , types . Dispatcher ) ) : key = fn . get_impl_key ( sig ) overloads = self . _defns [ key ] else : key = fn overloads = self . _defns [ key ] try : return _wrap_impl ( overloads . find ( sig . args ) , self , sig ) except NotImplementedError : pass if isinstance ( fn , types . Type ) : # It's a type instance => try to find a definition for the type class try : return self . get_function ( type ( fn ) , sig ) except NotImplementedError : # Raise exception for the type instance, for a better error message pass # Automatically refresh the context to load new registries if we are # calling the first time. if _firstcall : self . refresh ( ) return self . get_function ( fn , sig , _firstcall = False ) raise NotImplementedError ( "No definition for lowering %s%s" % ( key , sig ) )