code: def get_calendar(self, name):
          
          canonical_name = self.resolve_alias(name)
  
          try:
              return self._calendars[canonical_name]
          except KeyError:
              # We haven't loaded this calendar yet, so make a new one.
              pass
  
          try:
              factory = self._calendar_factories[canonical_name]
          except KeyError:
              # We don't have a factory registered for this name.  Barf.
              raise InvalidCalendarName(calendar_name=name)
  
          # Cache the calendar for future use.
          calendar = self._calendars[canonical_name] = factory()
          return calendar
docs: Retrieves an instance of an TradingCalendar whose name is given.
  
          Parameters
          ----------
          name : str
              The name of the TradingCalendar to be retrieved.
  
          Returns
          -------
          calendar : calendars.TradingCalendar
              The desired calendar.