<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def metric_create(self):
 """Create the defined metric. .. code-block:: javascript { "status": "Success", "data": { "customMetricConfig": { "id": 12, "name": "Added Reports", "dataType": "Sum", "interval": "Daily", "keyedValues": false, "description": "Added reports daily count." } } } """

        body = {
            'dataType': self._metric_data_type,
            'description': self._metric_description,
            'interval': self._metric_interval,
            'name': self._metric_name,
            'keyedValues': self._metric_keyed,
        }
        self.tcex.log.debug('metric body: {}'.format(body))
        r = self.tcex.session.post('/v2/customMetrics', json=body)

        if not r.ok or 'application/json' not in r.headers.get('content-type', ''):
            self.tcex.handle_error(700, [r.status_code, r.text])

        data = r.json()
        self._metric_id = data.get('data', {}).get('customMetricConfig', {}).get('id')
        self.tcex.log.debug('metric data: {}'.format(data))