private function makeDictionary(
        Configuration $configuration,
        $dictionary,
        array $overrides,
        string $path
    ): ExtendedDictionaryDefinition {
        $name = $dictionary;
        if (is_array($dictionary)) {
            if (!isset($dictionary['name'])) {
                throw new \InvalidArgumentException('Dictionary "' . $path . '" information is missing key "name".');
            }
            $name      = $dictionary['name'];
            $overrides = array_merge($overrides, $dictionary);
            unset($overrides['name']);
        }

        return new ExtendedDictionaryDefinition($name, $configuration, $overrides);
    }