code: def __init__(self, dates, fmt="%a"):
      self.dates = dates
      self.fmt = fmt
  
file_path: matplotlib/galleries/examples/ticks/date_index_formatter.py
imports: import matplotlib.pyplot
  import numpy
  import matplotlib.cbook
  from matplotlib.dates import DateFormatter, DayLocator
  import matplotlib.lines
  from matplotlib.ticker import Formatter
label_desc: Use image node_id 1 to create a new MyFormatter object from inherited base classes: Formatter with example: obj = MyFormatter(dates, fmt)