public static function getRequiredFields(AddressFormat $addressFormat, FieldOverrides $fieldOverrides)
    {
        $requiredFields = $addressFormat->getRequiredFields();
        $requiredFields = array_diff($requiredFields, $fieldOverrides->getOptionalFields());
        $requiredFields = array_diff($requiredFields, $fieldOverrides->getHiddenFields());
        if ($fieldOverrides->getRequiredFields()) {
            $requiredFields = array_merge($requiredFields, $fieldOverrides->getRequiredFields());
            $requiredFields = array_unique($requiredFields);
        }

        return $requiredFields;
    }