code: def __init__(self, *args, **kwargs):
      if not args:
          self.default_factory = None
      else:
          if not (args[0] is None or callable(args[0])):
              raise TypeError("first argument must be callable or None")
          self.default_factory = args[0]
          args = args[1:]
      super(OrderedDefaultdict, self).__init__(*args, **kwargs)
  
file_path: backtrader/backtrader/utils/ordereddefaultdict.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from collections import OrderedDict
  from .py3 import iteritems
label_desc: Use image node_id 1 to create a new OrderedDefaultdict object from inherited base classes: OrderedDict with example: obj = OrderedDefaultdict()