class_docstr: Utility class for reading and writing from ParlAI Conversations format.
  
  Conversations should be saved in JSONL format, where each line is
  a JSON of the following form:
  
  WARNING: The data below must be on ONE LINE per dialogue
  in a conversation file or it will not load!!
  
  .. code-block:
  
      {
          'possible_conversation_level_info': True,
          'dialog':
              [   [
                      {
                          'id': 'speaker_1',
                          'text': <first utterance>,
                      },
                      {
                          'id': 'speaker_2',
                          'text': <second utterance>,
                      },
                      ...
                  ],
                  ...
              ]
          ...
      }
class_docstr_tok: ["Utility","class","for","reading","and","writing","from","ParlAI","Conversations","format",".","Conversations","should","be","saved","in","JSONL","format",",","where","each","line","is","a","JSON","of","the","following","form",":","WARNING",":","The","data","below","must","be","on","ONE","LINE","per","dialogue","in","a","conversation","file","or","it","will","not","load","!","!","..","code-block",":","{","'possible_conversation_level_info","'",":","True",",","'dialog","'",":","[","[","{","'id","'",":","'speaker_1","'",",","'text","'",":","<","first","utterance",">",",","}",",","{","'id","'",":","'speaker_2","'",",","'text","'",":","<","second","utterance",">",",","}",",","...","]",",","...","]","...","}"]
docstr: Load metadata.
  
  Metadata should be saved at <identifier>.metadata
  Metadata should be of the following format:
  {
      'date': <date collected>,
      'opt': <opt used to collect the data>,
      'speakers': <identity of speakers>,
      ...
      Other arguments.
  }
docstr_tok: ["Load","metadata",".","Metadata","should","be","saved","at","<","identifier",">",".metadata","Metadata","should","be","of","the","following","format",":","{","'date","'",":","<","date","collected",">",",","'opt","'",":","<","opt","used","to","collect","the","data",">",",","'speakers","'",":","<","identity","of","speakers",">",",","...","Other","arguments.","}"]
code: def _load_metadata(self, datapath):
      """
      Load metadata.
  
      Metadata should be saved at <identifier>.metadata
      Metadata should be of the following format:
      {
          'date': <date collected>,
          'opt': <opt used to collect the data>,
          'speakers': <identity of speakers>,
          ...
          Other arguments.
      }
      """
      try:
          metadata = Metadata(datapath)
          return metadata
      except RuntimeError:
          logging.debug(
              "Metadata does not exist. Please double check your datapath."
          )
          return None
  
imports: import datetime
  import json
  import os
  import itertools
  from parlai.utils.io import PathManager
  from parlai.core.metrics import dict_report
  from parlai.utils.misc import AttrDict
  import parlai.utils.logging
label_desc: Use image node_id 6 for calling the Conversations obj's underlying member method code with example usage: obj._load_metadata(datapath) and returns: metadata, None