def METHOD_NAME(
    template_path: Path, provider: str, endpoint: str, media_types: list[str]
):
    with template_path.open("r", encoding="utf-8") as template:
        camel_provider = inflection.camelize(provider)
        screaming_snake_provider = inflection.underscore(provider).upper()
        # Build provider configuration
        provider_configuration = "\n        ".join(
            _render_provider_configuration(screaming_snake_provider, media_type)
            for media_type in media_types
        )
        template_string = template.read()
        script_string = (
            template_string.replace("{provider}", camel_provider)
            .replace("{screaming_snake_provider}", screaming_snake_provider)
            .replace("{provider_underscore}", inflection.underscore(provider))
            .replace("{provider_data_ingester}", f"{camel_provider}DataIngester")
            .replace("{endpoint}", endpoint)
            .replace("{provider_configuration}", provider_configuration)
        )
        return script_string