original_docstring: Remove untrainable entities from serialised training example `example`.
  
      Entities with an untrainable extractor will be removed. Untrainable extractors
      are defined in `rasa.nlu.constants.PRETRAINED_EXTRACTORS`.
  
      Args:
          example: Serialised training example to inspect.
      
docstring: Remove untrainable entities from serialised training example `example`.
  Entities with an untrainable extractor will be removed. Untrainable extractors
  are defined in `rasa.nlu.constants.PRETRAINED_EXTRACTORS`.
docstring_tokens: Remove untrainable entities from serialised training example ` example ` . Entities with an untrainable extractor will be removed . Untrainable extractors are defined in ` rasa . nlu . constants . PRETRAINED_EXTRACTORS ` .
code: def remove_untrainable_entities_from(example: Dict[Text, Any]) -> None:
      """Remove untrainable entities from serialised training example `example`.
  
      Entities with an untrainable extractor will be removed. Untrainable extractors
      are defined in `rasa.nlu.constants.PRETRAINED_EXTRACTORS`.
  
      Args:
          example: Serialised training example to inspect.
      """
  
      example_entities = example.get(ENTITIES)
  
      if not example_entities:
          # example contains no entities, so there's nothing to do
          return None
  
      trainable_entities = []
  
      for entity in example_entities:
          if entity.get(EXTRACTOR) in PRETRAINED_EXTRACTORS:
              logger.debug(
                  f"Excluding entity '{json.dumps(entity)}' from training data. "
                  f"Entity examples extracted by the following classes are not "
                  f"dumped to training data in markdown format: "
                  f"`{'`, `'.join(sorted(PRETRAINED_EXTRACTORS))}`."
              )
          else:
              trainable_entities.append(entity)
  
      example[ENTITIES] = trainable_entities
code_tokens: def remove_untrainable_entities_from ( example : Dict [ Text , Any ] ) -> None : example_entities = example . get ( ENTITIES ) if not example_entities : return None trainable_entities = [ ] for entity in example_entities : if entity . get ( EXTRACTOR ) in PRETRAINED_EXTRACTORS : logger . debug ( f"Excluding entity '{json.dumps(entity)}' from training data. " f"Entity examples extracted by the following classes are not " f"dumped to training data in markdown format: " f"`{'`, `'.join(sorted(PRETRAINED_EXTRACTORS))}`." ) else : trainable_entities . append ( entity ) example [ ENTITIES ] = trainable_entities
short_docstring: Remove untrainable entities from serialised training example `example`.
short_docstring_tokens: Remove untrainable entities from serialised training example ` example ` .
comment: """Remove untrainable entities from serialised training example `example`.
  
      Entities with an untrainable extractor will be removed. Untrainable extractors
      are defined in `rasa.nlu.constants.PRETRAINED_EXTRACTORS`.
  
      Args:
          example: Serialised training example to inspect.
      """$SEP$# example contains no entities, so there's nothing to do