class_docstr: Wrapper of ``pandas_market_calendars`` for a trading calendar. The package
  ``pandas_market_calendar`` must be installed
  
  Params:
  
    - ``calendar`` (default ``None``)
  
      The param ``calendar`` accepts the following:
  
      - string: the name of one of the calendars supported, for example
        `NYSE`. The wrapper will attempt to get a calendar instance
  
      - calendar instance: as returned by ``get_calendar('NYSE')``
  
    - ``cachesize`` (default ``365``)
  
      Number of days to cache in advance for lookup
  
  See also:
  
    - https://github.com/rsheftel/pandas_market_calendars
  
    - http://pandas-market-calendars.readthedocs.io/
class_docstr_tok: ["Wrapper","of","``","pandas_market_calendars","``","for","a","trading","calendar",".","The","package","``","pandas_market_calendar","``","must","be","installed","Params",":","-","``","calendar","``","(","default","``","None","``",")","The","param","``","calendar","``","accepts","the","following",":","-","string",":","the","name","of","one","of","the","calendars","supported",",","for","example","`","NYSE","`",".","The","wrapper","will","attempt","to","get","a","calendar","instance","-","calendar","instance",":","as","returned","by","``","get_calendar","(","'NYSE","'",")","``","-","``","cachesize","``","(","default","``","365","``",")","Number","of","days","to","cache","in","advance","for","lookup","See","also",":","-","https",":","\/\/github.com\/rsheftel\/pandas_market_calendars","-","http",":","\/\/pandas-market-calendars.readthedocs.io\/"]
code: def __init__(self):
      self._calendar = self.p.calendar
  
      if isinstance(
          self._calendar, string_types
      ):  # use passed mkt name
          import pandas_market_calendars as mcal
  
          self._calendar = mcal.get_calendar(self._calendar)
  
      import pandas as pd  # guaranteed because of pandas_market_calendars
  
      self.dcache = pd.DatetimeIndex([0.0])
      self.idcache = pd.DataFrame(index=pd.DatetimeIndex([0.0]))
      self.csize = timedelta(days=self.p.cachesize)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from datetime import datetime, timedelta, time
  from .metabase import MetaParams
  from backtrader.utils.py3 import string_types, with_metaclass
  from backtrader.utils import UTC
label_desc: Use image node_id 1 to create a new PandasMarketCalendar object from inherited base classes: TradingCalendarBase with example: obj = PandasMarketCalendar()