def METHOD_NAME(self, obj):
    try:
        self.conn.request('POST', '/', json.dumps(obj),
            { 'Authorization' : self.authhdr,
              'Content-type' : 'application/json' })
    except ConnectionRefusedError:
        print('RPC connection refused. Check RPC settings and the server status.',
              file=sys.stderr)
        return None
    resp = self.conn.getresponse()
    if resp is None:
        print("JSON-RPC: no response", file=sys.stderr)
        return None
    body = resp.read().decode('utf-8')
    resp_obj = json.loads(body)
    return resp_obj