def METHOD_NAME(self, warning):
    try:
        warning = pickle.dumps(warning)
        self.client.report_warning(self.client_id, warning)
    except (pickle.PicklingError, TypeError):
        _logger.error("Failed to pickle warning. Message: {}, File: {}, Line: {}",
                      warning.message, warning.filename, warning.lineno, extra={'capture': False})