class_docstr: Data Processor for SGD dialogues.
  
  More information at https://arxiv.org/abs/1909.05855
  
  ***Downloading the dataset***
      #   git clone https://github.com/google-research-datasets/dstc8-schema-guided-dialogue.git
  
  ***Data format***
  SGD data comes with a JSON schema file and dialogue files for each dataset split. 
  
  In the following we will show an example for a service entry in the schema file.
  * service_name
  * description
  * slots
      * name
      * description
      * is_categorical
      * possible values
  * intents
      * name
      * description
      * required_slots (not used)
      * is_transactional (not used)
      * optional_slots (not used)
      * result_slots (not used)
  
  
  In the following we will show an example for a dialogue. 
  * dialogue_id
  * services
  * turns
      * frames
          * actions
              * act
              * slot
              * values
          * service
          * slots
              * exclusive_end
              * slot
              * start
          * state
              * active_intent
              * requeste_slots
              * slot_values 
      * speaker - [USER, SYSTEM]
      * utterance
docstr: Returns a list of `InputExample`s of the data splits' dialogues.
  Args:
      dataset_split: data split, can be "train", "dev", or "test".
      schemas: schema for all services of all datasets 
      subsample: whether to balance postive and negative samples in the dataset
  Returns:
      examples: a list of `InputExample`s.
docstr_tok: ["Returns","a","list","of","`","InputExample","`","s","of","the","data","splits","'","dialogues",".","Args",":","dataset_split",":","data","split",",","can","be","``","train","''",",","``","dev","''",",","or","``","test","''",".","schemas",":","schema","for","all","services","of","all","datasets","subsample",":","whether","to","balance","postive","and","negative","samples","in","the","dataset","Returns",":","examples",":","a","list","of","`","InputExample","`","s","."]
code: def _generate_dialog_examples(
      self, dataset_split: str, schemas: object, subsample: bool
  ):
      """
      Returns a list of `InputExample`s of the data splits' dialogues.
      Args:
          dataset_split: data split, can be "train", "dev", or "test".
          schemas: schema for all services of all datasets
          subsample: whether to balance postive and negative samples in the dataset
      Returns:
          examples: a list of `InputExample`s.
      """
      logging.info(
          f"Creating examples and slot relation list from the dialogues started..."
      )
      dialog_paths = [
          os.path.join(
              self.data_dir,
              dataset_split,
              "dialogues_{:03d}.json".format(i),
          )
          for i in self._file_ranges[dataset_split]
      ]
      dialogs = DialogueSGDDataProcessor.load_dialogues(dialog_paths)
  
      examples = []
      slot_carryover_candlist = collections.defaultdict(int)
      for dialog_idx, dialog in enumerate(dialogs):
          if dialog_idx % 1000 == 0:
              logging.info(f"Processed {dialog_idx} dialogues.")
          examples.extend(
              self._create_examples_from_dialog(
                  dialog,
                  schemas,
                  dataset_split,
                  slot_carryover_candlist,
                  subsample,
              )
          )
  
      slots_relation_list = collections.defaultdict(list)
      for (
          slots_relation,
          relation_size,
      ) in slot_carryover_candlist.items():
          if relation_size > 0:
              slots_relation_list[
                  (slots_relation[0], slots_relation[1])
              ].append(
                  (slots_relation[2], slots_relation[3], relation_size)
              )
              slots_relation_list[
                  (slots_relation[2], slots_relation[3])
              ].append(
                  (slots_relation[0], slots_relation[1], relation_size)
              )
  
      return examples, slots_relation_list
  
imports: import collections
  import json
  import os
  import pickle
  import re
  from typing import List
  from nemo.collections.nlp.data.dialogue.data_processor.data_processor import DialogueDataProcessor
  from nemo.collections.nlp.data.dialogue.input_example.input_example import DialogueInputExample
  from nemo.collections.nlp.data.dialogue.sgd.schema import Schema
  from nemo.utils import logging
  from nemo.utils.get_rank import is_global_rank_zero
label_desc: Use image node_id 9 for calling the DialogueSGDDataProcessor obj's underlying member method code with example usage: obj._generate_dialog_examples(dataset_split, schemas, subsample) and returns: examples,  slots_relation_list