<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def data(self, resource_value, return_value=False):
 """Alias for metric_name method | HTTP Method | API Endpoint URI's | +==============+====================================+ | POST | /v2/customMetrics/{id}|{name}/data | Example ------- The weight value is optional. .. code-block:: javascript { "value": 1, "weight": 1, } **Keyed Example** The weight value is optional. .. code-block:: javascript { "value": 1, "weight": 1, "name": "src1" } Args: resource_name (string):
 The metric name. """

        if return_value:
            self._request_entity = None
            self._request.add_payload('returnValue', True)
        self._request_uri = '{}/{}/data'.format(self._request_uri, resource_value)