@staticmethod
def _set(s, k, v):
    """
        ``_set({"a":{"b":{"c":2}, "zz":"pp"}}, "a.b.m", "q")={'a': {'b': {'c': 2, 'm': 'q'}, 'zz': 'pp'}}``

        :param s: Dict.
        :param k: Any.
        :param v: Any.
        :return: Dict. after the set
        """
    ks = k.split('.')
    d = s
    for c, i in enumerate(ks):
        if not isinstance(d.get(i), dict):
            if c == len(ks) - 1:
                d[i] = v
                break
            else:
                return s
        d.setdefault(i, {})
        d = d[i]
    return s
