class_docstr: A class for dispatching and caching trading calendars.
  
  Methods of a global instance of this class are provided by
  catalyst.utils.calendar_utils.
  
  Parameters
  ----------
  calendars : dict[str -> TradingCalendar]
      Initial set of calendars.
  calendar_factories : dict[str -> function]
      Factories for lazy calendar creation.
  aliases : dict[str -> str]
      Calendar name aliases.
class_docstr_tok: ["A","class","for","dispatching","and","caching","trading","calendars",".","Methods","of","a","global","instance","of","this","class","are","provided","by","catalyst.utils.calendar_utils",".","Parameters","--","--","--","--","--","calendars",":","dict","[","str","-",">","TradingCalendar","]","Initial","set","of","calendars",".","calendar_factories",":","dict","[","str","-",">","function","]","Factories","for","lazy","calendar","creation",".","aliases",":","dict","[","str","-",">","str","]","Calendar","name","aliases","."]
docstr: Register an alias for a calendar.
  
  This is useful when multiple exchanges should share a calendar, or when
  there are multiple ways to refer to the same exchange.
  
  After calling ``register_alias('alias', 'real_name')``, subsequent
  calls to ``get_calendar('alias')`` will return the same result as
  ``get_calendar('real_name')``.
  
  Parameters
  ----------
  alias : str
      The name to be used to refer to a calendar.
  real_name : str
      The canonical name of the registered calendar.
  force : bool, optional
      If True, old calendars will be overwritten on a name collision.
      If False, name collisions will raise an exception.
      Default is False.
docstr_tok: ["Register","an","alias","for","a","calendar",".","This","is","useful","when","multiple","exchanges","should","share","a","calendar",",","or","when","there","are","multiple","ways","to","refer","to","the","same","exchange",".","After","calling","``","register_alias","(","'alias","'",",","'real_name","'",")","``",",","subsequent","calls","to","``","get_calendar","(","'alias","'",")","``","will","return","the","same","result","as","``","get_calendar","(","'real_name","'",")","``",".","Parameters","--","--","--","--","--","alias",":","str","The","name","to","be","used","to","refer","to","a","calendar",".","real_name",":","str","The","canonical","name","of","the","registered","calendar",".","force",":","bool",",","optional","If","True",",","old","calendars","will","be","overwritten","on","a","name","collision",".","If","False",",","name","collisions","will","raise","an","exception",".","Default","is","False","."]
code: def register_calendar_alias(self, alias, real_name, force=False):
      """
      Register an alias for a calendar.
  
      This is useful when multiple exchanges should share a calendar, or when
      there are multiple ways to refer to the same exchange.
  
      After calling ``register_alias('alias', 'real_name')``, subsequent
      calls to ``get_calendar('alias')`` will return the same result as
      ``get_calendar('real_name')``.
  
      Parameters
      ----------
      alias : str
          The name to be used to refer to a calendar.
      real_name : str
          The canonical name of the registered calendar.
      force : bool, optional
          If True, old calendars will be overwritten on a name collision.
          If False, name collisions will raise an exception.
          Default is False.
      """
      if force:
          self.deregister_calendar(alias)
  
      if self.has_calendar(alias):
          raise CalendarNameCollision(calendar_name=alias)
  
      self._aliases[alias] = real_name
  
      # Ensure that the new alias doesn't create a cycle, and back it out if
      # we did.
      try:
          self.resolve_alias(alias)
      except CyclicCalendarAlias:
          del self._aliases[alias]
          raise
  
imports: from catalyst.errors import CalendarNameCollision, CyclicCalendarAlias, InvalidCalendarName
  from .exchange_calendar_open import OpenExchangeCalendar
  from .exchange_calendar_cfe import CFEExchangeCalendar
  from .exchange_calendar_ice import ICEExchangeCalendar
  from .exchange_calendar_nyse import NYSEExchangeCalendar
  from .exchange_calendar_cme import CMEExchangeCalendar
  from .exchange_calendar_bmf import BMFExchangeCalendar
  from .exchange_calendar_lse import LSEExchangeCalendar
  from .exchange_calendar_tsx import TSXExchangeCalendar
  from .us_futures_calendar import QuantopianUSFuturesCalendar
label_desc: Use image node_id 6 for calling the TradingCalendarDispatcher obj's underlying member method code with example usage: obj.register_calendar_alias(alias, real_name, force) without return types