class_docstr: Holds loaded intent and entity training data.
class_docstr_tok: ["Holds","loaded","intent","and","entity","training","data","."]
docstr: Return merged instance of this data with other training data.
  
  Args:
      others: other training data instances to merge this one with
  
  Returns:
      Merged training data object. Merging is not done in place, this
      will be a new instance.
docstr_tok: ["Return","merged","instance","of","this","data","with","other","training","data",".","Args",":","others",":","other","training","data","instances","to","merge","this","one","with","Returns",":","Merged","training","data","object",".","Merging","is","not","done","in","place",",","this","will","be","a","new","instance","."]
code: def merge(self, *others: Optional["TrainingData"]) -> "TrainingData":
      """Return merged instance of this data with other training data.
  
      Args:
          others: other training data instances to merge this one with
  
      Returns:
          Merged training data object. Merging is not done in place, this
          will be a new instance.
      """
      training_examples = copy.deepcopy(self.training_examples)
      entity_synonyms = self.entity_synonyms.copy()
      regex_features = copy.deepcopy(self.regex_features)
      lookup_tables = copy.deepcopy(self.lookup_tables)
      responses = copy.deepcopy(self.responses)
  
      for o in others:
          if not o:
              continue
  
          training_examples.extend(copy.deepcopy(o.training_examples))
          regex_features.extend(copy.deepcopy(o.regex_features))
          lookup_tables.extend(copy.deepcopy(o.lookup_tables))
  
          for text, syn in o.entity_synonyms.items():
              util.check_duplicate_synonym(
                  entity_synonyms, text, syn, "merging training data"
              )
  
          entity_synonyms.update(o.entity_synonyms)
          responses.update(o.responses)
  
      return TrainingData(
          training_examples,
          entity_synonyms,
          regex_features,
          lookup_tables,
          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 5 for calling the TrainingData obj's underlying member method code with example usage: obj.merge() and returns: TrainingData