def sanitize_metric_name(name: str) -> str:
    """Sanitize scope/variable name for tensorflow and mlflow

    This is needed as sometimes variables automatically created while
    building layers contain forbidden characters
    >>> from tensorflow.python.framework.ops import _VALID_SCOPE_NAME_REGEX as TF_VALID_REGEX
    >>> from mlflow.utils.validation import _VALID_PARAM_AND_METRIC_NAMES as MLFLOW_VALID_REGEX
    >>> from deepr.metrics import sanitize_metric_name
    >>> kernel_variable_name = 'my_layer/kernel:0'
    >>> bool(TF_VALID_REGEX.match(kernel_variable_name))
    False
    >>> bool(MLFLOW_VALID_REGEX.match(kernel_variable_name))
    False
    >>> bool(TF_VALID_REGEX.match(sanitize_metric_name(kernel_variable_name)))
    True
    >>> bool(MLFLOW_VALID_REGEX.match(sanitize_metric_name(kernel_variable_name)))
    True
    """
    name = name.replace(":", "-")
    return name