docs: def _start_map(cls,
                   name,
                   mapper_spec,
                   mapreduce_params,
                   queue_name,
                   eta=None,
                   countdown=None,
                   hooks_class_name=None,
                   _app=None,
                   in_xg_transaction=False):
      # pylint: disable=g-doc-args
      # pylint: disable=g-doc-return-or-yield
      """See control.start_map.
  
      Requirements for this method:
      1. The request that invokes this method can either be regular or
         from taskqueue. So taskqueue specific headers can not be used.
      2. Each invocation transactionally starts an isolated mapreduce job with
         a unique id. MapreduceState should be immediately available after
         returning. See control.start_map's doc on transactional.
      3. Method should be lightweight.
      """
      # Validate input reader.
      mapper_input_reader_class = mapper_spec.input_reader_class()
      mapper_input_reader_class.validate(mapper_spec)
  
      # Validate output writer.
      mapper_output_writer_class = mapper_spec.output_writer_class()
      if mapper_output_writer_class:
        mapper_output_writer_class.validate(mapper_spec)
  
      # Create a new id and mr spec.
      mapreduce_id = model.MapreduceState.new_mapreduce_id()
      mapreduce_spec = model.MapreduceSpec(
          name,
          mapreduce_id,
          mapper_spec.to_json(),
          mapreduce_params,
          hooks_class_name)
  
      # Validate mapper handler.
      ctx = context.Context(mapreduce_spec, None)
      context.Context._set(ctx)
      try:
        # pylint: disable=pointless-statement
        mapper_spec.handler
      finally:
        context.Context._set(None)
  
      # Save states and enqueue task.
      if in_xg_transaction:
        propagation = db.MANDATORY
      else:
        propagation = db.INDEPENDENT
  
      @db.transactional(propagation=propagation)
      def _txn():
        cls._create_and_save_state(mapreduce_spec, _app)
        cls._add_kickoff_task(mapreduce_params["base_path"], mapreduce_spec, eta,
                              countdown, queue_name)
      _txn()
  
      return mapreduce_id