def METHOD_NAME(self, d, p=None, paths=None, joinchar='.'):
    if p is None:
        paths = {}
        self.METHOD_NAME(d, "", paths, joinchar=joinchar)
        return paths
    pn = p
    if p != "":
        pn += joinchar
    if isinstance(d, dict):
        for k in d:
            v = d[k]
            self.METHOD_NAME(v, str(pn) + str(k), paths, joinchar=joinchar)
    elif isinstance(d, list):
        for idx, e in enumerate(d):
            self.METHOD_NAME(e, pn + str(idx), paths, joinchar=joinchar)
    else:
        paths[p] = d