docs: def new(self, fn_input, fn_name, name=None, tags=None, properties=None, details=None,
              instance_type=None, depends_on=None,
              **kwargs):
          '''
          :param fn_input: Function input
          :type fn_input: dict
          :param fn_name: Name of the function to be called
          :type fn_name: string
          :param name: Name for the new job (default is "<parent job name>:<fn_name>")
          :type name: string
          :param tags: Tags to associate with the job
          :type tags: list of strings
          :param properties: Properties to associate with the job
          :type properties: dict with string values
          :param details: Details to set for the job
          :type details: dict or list
          :param instance_type: Instance type on which the job will be run, or a dict mapping function names to instance type requests
          :type instance_type: string or dict
          :param depends_on: List of data objects or jobs to wait that need to enter the "closed" or "done" states, respectively, before the new job will be run; each element in the list can either be a dxpy handler or a string ID
          :type depends_on: list
  
          Creates and enqueues a new job that will execute a particular
          function (from the same app or applet as the one the current job
          is running).
  
          .. note:: This method is intended for calls made from within
             already-executing jobs or apps. If it is called from outside
             of an Execution Environment, an exception will be thrown. To
             create new jobs from outside the Execution Environment, use
             :func:`dxpy.bindings.dxapplet.DXApplet.run` or
             :func:`dxpy.bindings.dxapp.DXApp.run`.
  
          '''
          final_depends_on = []
          if depends_on is not None:
              if isinstance(depends_on, list):
                  for item in depends_on:
                      if isinstance(item, DXJob) or isinstance(item, DXDataObject):
                          if item.get_id() is None:
                              raise DXError('A dxpy handler given in depends_on does not have an ID set')
                          final_depends_on.append(item.get_id())
                      elif isinstance(item, basestring):
                          final_depends_on.append(item)
                      else:
                          raise DXError('Expected elements of depends_on to only be either instances of DXJob or DXDataObject, or strings')
              else:
                  raise DXError('Expected depends_on field to be a list')
  
          if 'DX_JOB_ID' in os.environ:
              req_input = {}
              req_input["input"] = fn_input
              req_input["function"] = fn_name
              if name is not None:
                  req_input["name"] = name
              if tags is not None:
                  req_input["tags"] = tags
              if properties is not None:
                  req_input["properties"] = properties
              if instance_type is not None:
                  req_input["systemRequirements"] = SystemRequirementsDict.from_instance_type(instance_type, fn_name).as_dict()
              if depends_on is not None:
                  req_input["dependsOn"] = final_depends_on
              if details is not None:
                  req_input["details"] = details
              resp = dxpy.api.job_new(req_input, **kwargs)
              self.set_id(resp["id"])
          else:
              self.set_id(queue_entry_point(function=fn_name, input_hash=fn_input,
                                            depends_on=final_depends_on,
                                            name=name))