public static function createFromKeys(array $keys): self
    {
        $keys = \array_filter($keys, function () {
            return true;
        });
        foreach ($keys as $k => $v) {
            if ($v->has('kid')) {
                unset($keys[$k]);
                $keys[$v->get('kid')] = $v;
            }
        }

        return new self($keys);
    }