code: def close(self, connection, reason='Closed via management api'):
          
          close_payload = json.dumps({
              'name': connection,
              'reason': reason
          })
          connection = quote(connection, '')
          return self.http_client.delete(API_CONNECTION % connection,
                                         payload=close_payload,
                                         headers={
                                             'X-Reason': reason
                                         })
docs: Close Connection.
  
          :param str connection: Connection name
          :param str reason: Reason for closing connection.
  
          :raises ApiError: Raises if the remote server encountered an error.
          :raises ApiConnectionError: Raises if there was a connectivity issue.
  
          :rtype: None