docs: def flatten_dict(d,
                   parent_key='', sep='.',
                   ignore_under_prefixed=True,
                   mark_value=True):
      '''
      Flattens a nested dictionary
  
      >>> from pprint import pprint
      >>> d = {"a": {"b": {"c": 1, "b": 2, "__d": 'ignore', "_e": "mark"} } }
      >>> fd = flatten_dict(d)
      >>> pprint(fd)
      {'a.b._e': "'mark'", 'a.b.b': 2, 'a.b.c': 1}
      '''
      items = {}
      for k in d:
          if ignore_under_prefixed and k.startswith('__'): continue
          v = d[k]
          if mark_value and k.startswith('_') and not k.startswith('__'):
              v = MarkValue(repr(v))
  
          new_key = sep.join((parent_key, k)) if parent_key else k
          if isinstance(v, collections.MutableMapping):
              items.update(flatten_dict(v, new_key, sep=sep,
                                          ignore_under_prefixed=True,
                                          mark_value=True)
                              )
          else:
              items[new_key] = v
  
      return items