code: def index(
      self, index, doc_type, body, id=None, params=None, headers=None
  ):
      if index not in self.__documents_dict:
          self.__documents_dict[index] = []
  
      if id is None:
          id = get_random_id()
  
      version = 1
  
      self.__documents_dict[index].append(
          {
              "_type": doc_type,
              "_id": id,
              "_source": body,
              "_index": index,
              "_version": version,
              "_headers": headers,
          }
      )
  
      return {
          "_type": doc_type,
          "_id": id,
          "created": True,
          "_version": version,
          "_index": index,
          "_headers": headers,
      }
  
imports: from __future__ import annotations
  import fnmatch
  import json
  from elasticsearch import Elasticsearch
  from elasticsearch.exceptions import NotFoundError
  from .utilities import MissingIndexException, get_random_id, query_params
label_desc: Use image node_id 5 for calling the FakeElasticsearch obj's underlying member method code with example usage: obj.index(index, doc_type, body, id, params, headers) and returns: dict