def core_config(self, title: str | None) -> core_schema.CoreConfig:
        """Create a pydantic-core config.

        We don't use getattr here since we don't want to populate with defaults.

        Args:
            title: The title to use if not set in config.

        Returns:
            A `CoreConfig` object created from config.
        """
        config = self.config_dict

        if config.get('schema_generator') is not None:
            warnings.warn(
                'The `schema_generator` setting has been deprecated since v2.10. This setting no longer has any effect.',
                PydanticDeprecatedSince210,
                stacklevel=2,
            )

        if (populate_by_name := config.get('populate_by_name')) is not None:
            # We include this patch for backwards compatibility purposes, but this config setting will be deprecated in v3.0, and likely removed in v4.0.
            # Thus, the above warning and this patch can be removed then as well.
            if config.get('validate_by_name') is None:
                config['validate_by_alias'] = True
                config['validate_by_name'] = populate_by_name

        # We dynamically patch validate_by_name to be True if validate_by_alias is set to False
        # and validate_by_name is not explicitly set.
        if config.get('validate_by_alias') is False and config.get('validate_by_name') is None:
            config['validate_by_name'] = True

        if (not config.get('validate_by_alias', True)) and (not config.get('validate_by_name', False)):
            raise PydanticUserError(
                'At least one of `validate_by_alias` or `validate_by_name` must be set to True.',
                code='validate-by-alias-and-name-false',
            )

        return core_schema.CoreConfig(
            **{  # pyright: ignore[reportArgumentType]
                k: v
                for k, v in (
                    ('title', config.get('title') or title or None),
                    ('extra_fields_behavior', config.get('extra')),
                    ('allow_inf_nan', config.get('allow_inf_nan')),
                    ('str_strip_whitespace', config.get('str_strip_whitespace')),
                    ('str_to_lower', config.get('str_to_lower')),
                    ('str_to_upper', config.get('str_to_upper')),
                    ('strict', config.get('strict')),
                    ('ser_json_timedelta', config.get('ser_json_timedelta')),
                    ('ser_json_bytes', config.get('ser_json_bytes')),
                    ('val_json_bytes', config.get('val_json_bytes')),
                    ('ser_json_inf_nan', config.get('ser_json_inf_nan')),
                    ('from_attributes', config.get('from_attributes')),
                    ('loc_by_alias', config.get('loc_by_alias')),
                    ('revalidate_instances', config.get('revalidate_instances')),
                    ('validate_default', config.get('validate_default')),
                    ('str_max_length', config.get('str_max_length')),
                    ('str_min_length', config.get('str_min_length')),
                    ('hide_input_in_errors', config.get('hide_input_in_errors')),
                    ('coerce_numbers_to_str', config.get('coerce_numbers_to_str')),
                    ('regex_engine', config.get('regex_engine')),
                    ('validation_error_cause', config.get('validation_error_cause')),
                    ('cache_strings', config.get('cache_strings')),
                    ('validate_by_alias', config.get('validate_by_alias')),
                    ('validate_by_name', config.get('validate_by_name')),
                    ('serialize_by_alias', config.get('serialize_by_alias')),
                )
                if v is not None
            }
        )
Create a pydantic-core config.

        We don't use getattr here since we don't want to populate with defaults.

        Args:
            title: The title to use if not set in config.

        Returns:
            A `CoreConfig` object created from config.
        
pydantic/_internal/_config.py