original_docstring: 
          fetch the document with the set document _key or generates a new one with such a key
  
          :param collection: the collection where to store the document
          :param document_key: key of the document to fetch
          :return: the document itself
          
docstring: fetch the document with the set document _key or generates a new one with such a key
docstring_tokens: fetch the document with the set document _key or generates a new one with such a key
code: def fetch_or_create_document(self, collection: StandardCollection, document_key: int) -> Dict[str, Any]:
          """
          fetch the document with the set document _key or generates a new one with such a key
  
          :param collection: the collection where to store the document
          :param document_key: key of the document to fetch
          :return: the document itself
          """
          doc = collection.get(str(document_key))
          if doc is None:
              collection.insert({'_key': str(document_key)})
              doc = collection.get(str(document_key))
          return doc
code_tokens: def fetch_or_create_document ( self , collection : StandardCollection , document_key : int ) -> Dict [ str , Any ] : doc = collection . get ( str ( document_key ) ) if doc is None : collection . insert ( { '_key' : str ( document_key ) } ) doc = collection . get ( str ( document_key ) ) return doc
short_docstring: fetch the document with the set document _key or generates a new one with such a key
short_docstring_tokens: fetch the document with the set document _key or generates a new one with such a key
comment: """
          fetch the document with the set document _key or generates a new one with such a key
  
          :param collection: the collection where to store the document
          :param document_key: key of the document to fetch
          :return: the document itself
          """