<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_metric_by_name(self, metric_name, metric_type, description=None, custom_properties=None, tags=None, **kwargs):
 """ Create or update a metric object Args: metric_name (string):
 name of metric type (string):
 metric type, must be one of 'gauge', 'counter', 'cumulative_counter' description (optional[string]):
 a description custom_properties (optional[dict]):
 dictionary of custom properties tags (optional[list of strings]):
 list of tags associated with metric """

        data = {'type': metric_type.upper(),
                'description': description or '',
                'customProperties': custom_properties or {},
                'tags': tags or []}
        resp = self._put(self._u(self._METRIC_ENDPOINT_SUFFIX,
                                 str(metric_name)),
                         data=data, **kwargs)
        resp.raise_for_status()
        return resp.json()