<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def post(self, service, data):
 """Generic POST operation for sending data to Learning Modules API. Data should be a JSON string or a dict. If it is not a string, it is turned into a JSON string for the POST body. Args: service (str):
 The endpoint service to use, i.e. gradebook data (json or dict):
 the data payload Raises: requests.RequestException: Exception connection error ValueError: Unable to decode response content Returns: list: the json-encoded content of the response """

        url = self._url_format(service)
        data = Base._data_to_json(data)
        # Add content-type for body in POST.
        headers = {'content-type': 'application/json'}
        return self.rest_action(self._session.post, url,
                                data=data, headers=headers)