def METHOD_NAME(
    self,
    metric_name: str,
    unit: str,
    dimension_names: list = [],
    metric_type: MetricTypes = MetricTypes.COUNTER,
) -> CachingMetric:
    """
    Create a new metric and add into cache. Override existing metric with same name if present.
    Parameters
    ----------
    metric_name str
        Name of metric
    unit str
        unit can be one of ms, percent, count, MB, GB or a generic string
    dimension_names list
        list of dimension name strings for the metric
    metric_type MetricTypes
        Type of metric Counter, Gauge, Histogram
    Returns
    -------
    newly created Metrics object
    """
    self._check_type(metric_name, str, "`metric_name` must be a str")
    self._check_type(unit, str, "`unit` must be a str")
    self._check_type(
        metric_type, MetricTypes, "`metric_type` must be a MetricTypes enum"
    )
    if dimension_names:
        self._check_type(
            dimension_names,
            list,
            "`dimension_names` should be a list of dimension name strings",
        )
    if metric_type not in self.cache.keys():
        self.cache[metric_type] = {}
    metric = CachingMetric(
        metric_name=metric_name,
        unit=unit,
        dimension_names=dimension_names,
        metric_type=metric_type,
    )
    if metric_name in self.cache[metric_type].keys():
        logging.warning(f"Overriding existing key {metric_type}:{metric_name}")
    self.cache[metric_type][metric_name] = metric
    return metric