class_docstr: Holds loaded intent and entity training data.
class_docstr_tok: ["Holds","loaded","intent","and","entity","training","data","."]
docstr: Filter training examples.
  
  Args:
      condition: A function that will be applied to filter training examples.
  
  Returns:
      TrainingData: A TrainingData with filtered training examples.
docstr_tok: ["Filter","training","examples",".","Args",":","condition",":","A","function","that","will","be","applied","to","filter","training","examples",".","Returns",":","TrainingData",":","A","TrainingData","with","filtered","training","examples","."]
code: def filter_training_examples(
      self, condition: Callable[[Message], bool]
  ) -> "TrainingData":
      """Filter training examples.
  
      Args:
          condition: A function that will be applied to filter training examples.
  
      Returns:
          TrainingData: A TrainingData with filtered training examples.
      """
      return TrainingData(
          list(filter(condition, self.training_examples)),
          self.entity_synonyms,
          self.regex_features,
          self.lookup_tables,
          self.responses,
      )
  
imports: import logging
  import os
  from pathlib import Path
  import random
  from collections import Counter, OrderedDict
  import copy
  from os.path import relpath
  from typing import Any, Dict, List, Optional, Set, Text, Tuple, Callable
  import operator
  import rasa.shared.data
  from rasa.shared.utils.common import lazy_property
  import rasa.shared.utils.io
  from rasa.shared.nlu.constants import RESPONSE, INTENT_RESPONSE_KEY, ENTITY_ATTRIBUTE_TYPE, ENTITY_ATTRIBUTE_GROUP, ENTITY_ATTRIBUTE_ROLE, NO_ENTITY_TAG, INTENT, ENTITIES, TEXT, ACTION_NAME
  from rasa.shared.nlu.training_data.message import Message
  from rasa.shared.nlu.training_data import util
label_desc: Use image node_id 6 for calling the TrainingData obj's underlying member method code with example usage: obj.filter_training_examples(condition) and returns: TrainingData