code: def run_query(
          self, project_id, partition_id, read_options=None, query=None, gql_query=None
      ):
          
          request_pb = _datastore_pb2.RunQueryRequest(
              project_id=project_id,
              partition_id=partition_id,
              read_options=read_options,
              query=query,
              gql_query=gql_query,
          )
          return _rpc(
              self.client._http,
              project_id,
              "runQuery",
              self.client._base_url,
              request_pb,
              _datastore_pb2.RunQueryResponse,
          )
docs: Perform a ``runQuery`` request.
  
          :type project_id: str
          :param project_id: The project to connect to. This is
                             usually your project name in the cloud console.
  
          :type partition_id: :class:`.entity_pb2.PartitionId`
          :param partition_id: Partition ID corresponding to an optional
                               namespace and project ID.
  
          :type read_options: :class:`.datastore_pb2.ReadOptions`
          :param read_options: (Optional) The options for this query. Contains
                               either the transaction for the read or
                               ``STRONG`` or ``EVENTUAL`` read consistency.
  
          :type query: :class:`.query_pb2.Query`
          :param query: (Optional) The query protobuf to run. At most one of
                        ``query`` and ``gql_query`` can be specified.
  
          :type gql_query: :class:`.query_pb2.GqlQuery`
          :param gql_query: (Optional) The GQL query to run. At most one of
                            ``query`` and ``gql_query`` can be specified.
  
          :rtype: :class:`.datastore_pb2.RunQueryResponse`
          :returns: The returned protobuf response object.