public static function expand(array $data, $separator = '.')
    {
        $result = [];
        foreach ($data as $flat => $value) {
            $keys = explode($separator, $flat);
            $keys = array_reverse($keys);
            $child = [
            $keys[0] => $value
            ];
            array_shift($keys);
            foreach ($keys as $k) {
                $child = [
                $k => $child
                ];
            }

            $stack = [[$child, &$result]];
            static::mergeHelper($stack, $result);
        }

        return $result;
    }