<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _log_http_response(method, url, status, headers=None, content=None):
 """ Log the HTTP response of an HMC REST API call, at the debug level. Parameters: method (:term:`string`):
 HTTP method name in upper case, e.g. 'GET' url (:term:`string`):
 HTTP URL (base URL and operation URI) status (integer):
 HTTP status code headers (iterable):
 HTTP headers returned in the response content (:term:`string`):
 HTTP body (aka content) returned in the response """

        if method == 'POST' and url.endswith('/api/sessions'):
            # In Python 3 up to 3.5, json.loads() requires unicode strings.
            if sys.version_info[0] == 3 and sys.version_info[1] in (4, 5) and \
                    isinstance(content, six.binary_type):
                content = content.decode('utf-8')
            try:
                content_dict = json.loads(content)
            except ValueError as exc:
                content = '"Error: Cannot parse JSON payload of response: ' \
                    '{}"'.format(exc)
            else:
                content_dict['api-session'] = '********'
                content_dict['session-credential'] = '********'
                content = json.dumps(content_dict)
        if headers and 'X-API-Session' in headers:
            headers = headers.copy()
            headers['X-API-Session'] = '********'
        HMC_LOGGER.debug("Respons: %s %s, status: %s, headers: %r, "
                         "content(max.1000): %.1000r",
                         method, url, status, headers, content)