docs: def _defaultdict(dct, fallback=_illegal_character):
      """Wraps the given dictionary such that the given fallback function will be called when a nonexistent key is
      accessed.
      """
      out = defaultdict(lambda: fallback)
      for k, v in six.iteritems(dct):
          out[k] = v
      return out