code: def cancel(self, client=None):
          
          client = self._require_client(client)
  
          extra_params = {}
          if self.location:
              extra_params["location"] = self.location
  
          api_response = client._connection.api_request(
              method="POST", path="%s/cancel" % (self.path,), query_params=extra_params
          )
          self._set_properties(api_response["job"])
          # The Future interface requires that we return True if the *attempt*
          # to cancel was successful.
          return True
docs: API call:  cancel job via a POST request
  
          See
          https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/cancel
  
          :type client: :class:`~google.cloud.bigquery.client.Client` or
                        ``NoneType``
          :param client: the client to use.  If not passed, falls back to the
                         ``client`` stored on the current dataset.
  
          :rtype: bool
          :returns: Boolean indicating that the cancel request was sent.