def METHOD_NAME(dataset_name: str, tag: str, description="", force=False):
    """Adds a new tag to a dataset.
    Validates if the tag already exists and that the tag follows the same rules as docker tags.
    See https://docs.docker.com/engine/reference/commandline/tag/ for a documentation of docker tag syntax.
    Raises:
        ``errors.ParameterError``: If tag is too long or contains invalid characters.
    """
    if len(tag) > 128:
        raise errors.ParameterError("Tags can be at most 128 characters long.")
    if not re.match("^(?![.-])[a-zA-Z0-9_.-]{1,128}$", tag):
        raise errors.ParameterError(
            f"Tag '{tag}' is invalid.\n"
            "Only characters a-z, A-Z, 0-9, ., - and _ are allowed.\nTag can't start with a . or -"
        )
    datasets_provenance = DatasetsProvenance()
    dataset = datasets_provenance.get_by_name(dataset_name, strict=True)
    assert dataset is not None
    tags = datasets_provenance.get_all_tags(dataset)
    existing_tag = next((t for t in tags if t.name == tag), None)
    if existing_tag:
        if not force:
            raise errors.ParameterError(f"Tag '{tag}' already exists")
        datasets_provenance.remove_tag(dataset, existing_tag)
    new_tag = DatasetTag(dataset_id=Url(url_id=dataset.id), description=description, name=tag)
    datasets_provenance.add_tag(dataset, new_tag)