Handles Datastore response errors according to their documentation.

        Parameters:
          error(dict)

        Returns:
          int or None: The max number of times this error should be
          retried or None if it shouldn't.

        See also:
          https://cloud.google.com/datastore/docs/concepts/errors

def _max_retries_for_error(self, error):
        """Handles Datastore response errors according to their documentation.

        Parameters:
          error(dict)

        Returns:
          int or None: The max number of times this error should be
          retried or None if it shouldn't.

        See also:
          https://cloud.google.com/datastore/docs/concepts/errors
        """
        status = error.get("status")
        if status == "ABORTED" and get_transactions() > 0:
            # Avoids retrying Conflicts when inside a transaction.
            return None
        return self._MAX_RETRIES.get(status)