code: def get_transform_version(transform):
      
  
      if sys.version_info[0] > 3:
          spec = inspect.getfullargspec(transform)
      else:
          spec = inspect.getargspec(transform)
  
      if spec.varargs:
          return 3
  
      n = len(spec.args)
  
      if 2 <= n <= 3:
          return n
  
      raise Exception('Could not determine transform version.')
docs: Internal API: Returns the version of the transform function based on the transform function's signature. Currently,
      only two versions are supported (2 and 3). This is what version 2 transform functions look like:
  
      def transform(request, response):
          ...
  
      Version 3 transforms have the additional config variable like so:
  
      def transform(request, response, config):
          ...
  
      Or can have a varargs parameter as a third argument:
  
      def transform(request, response, *args):
          ...
  
      In both cases, version 3 transforms will be passed a local copy of the canari configuration object as the third
      argument. However, in the latter example, the configuration object will be stored in a tuple (i.e. (config,)).