class_docstr: Reader for NLU training data.
docstr: Infer and load example file based on root filename and root format.
docstr_tok: ["Infer","and","load","example","file","based","on","root","filename","and","root","format","."]
code: def _read_examples(
      fn: Text, language: Text, fformat: Text
  ) -> Optional[List[Dict[Text, Any]]]:
      """Infer and load example file based on root filename and root format."""
      if fformat == DIALOGFLOW_INTENT:
          examples_type = "usersays"
      else:
          examples_type = "entries"
      examples_fn_ending = f"_{examples_type}_{language}.json"
      examples_fn = fn.replace(".json", examples_fn_ending)
      if os.path.isfile(examples_fn):
          return rasa.shared.utils.io.read_json_file(examples_fn)
      else:
          return None
  
imports: import logging
  import os
  from pathlib import Path
  from typing import Any, Dict, Optional, Text, List, Tuple, Union
  import rasa.shared.nlu.training_data.util
  from rasa.shared.constants import DOCS_BASE_URL
  from rasa.shared.nlu.training_data.formats.readerwriter import TrainingDataReader
  from rasa.shared.nlu.training_data.util import transform_entity_synonyms
  import rasa.shared.utils.io
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.nlu.training_data.message import Message
label_desc: Use image node_id 9 for calling the DialogflowReader obj's underlying member method code with example usage: obj._read_examples(fn, language, fformat) and returns: rasa, None