code: def dprint(OD, mode='dict', s="", indent=' ' * 4, level=0):
      
  
      def is_number(s):
          """
          checks if the type of s is a float
          :param s: 
          :return: 
          """
          try:
              float(s)
              return True
          except ValueError:
              return False
  
      def fstr(s):
          """
          return a string or number
          :param s: teh string or number
          :return: 
          """
          return s if is_number(s) else '"%s"' % s
  
      if mode != 'dict':
          kv_tpl = '("%s", %s)'
          ST = 'OrderedDict([\n'
          END = '])'
      else:
          kv_tpl = '"%s": %s'
          ST = '{\n'
          END = '}'
      for i, k in enumerate(OD.keys()):
          if type(OD[k]) in [dict, OrderedDict]:
              level += 1
              s += (level - 1) * indent + kv_tpl % (
                  k, ST + dprint(OD[k], mode=mode,
                                 indent=indent, level=level) + (
                          level - 1) * indent + END)
              level -= 1
          else:
              s += level * indent + kv_tpl % (k, fstr(OD[k]))
          if i != len(OD) - 1:
              s += ","
          s += "\n"
      return s
docs: a recursive dict printer method that adds indentations
      TODO: needs better explanation and test example
      :param OD: the ordered dict
      :param mode: the mode is dict
      :param s: TODO
      :param indent: the indentation characters. default is 4
      :param level: the level
      :return: