def METHOD_NAME(endpoint, metadata_path):
    """
    Applies Hasura metadata. Overwrites any existing schema.
    """
    response = None
    try:
        click.secho("\nApplying Hasura metadata...")
        apply_hasura_metadata(endpoint=endpoint, metadata_path=metadata_path)
        click.secho("\nFinished!", fg="green")
    except Exception as exc:
        click.secho("\nCould not apply metadata!", bg="red", bold=True)
        if response is not None:
            raise click.ClickException(response.content)
        raise click.ClickException(exc)