def declare_relation(self,
                       rel_name,
                       domain_type,
                       range_type,
                       trainable = False,
                       dense = False,
                       gpus = 0):
    """Declare the domain and range types for a relation.

    Args:
      rel_name: string naming a relation
      domain_type: string naming the type of subject entities for the relation
      range_type: string naming the type of object entities for the relation
      trainable: boolean, true if the weights for this relation will be trained
      dense: if true, store data as a dense tensor instead of a SparseTensor
      gpus: number of gpus available for computation

    Raises:
      RelationNameError: If a relation with this name already exists.
    """
    super(DistributedNeuralQueryContext,
          self).declare_relation(rel_name, domain_type, range_type, trainable,
                                 dense)
    if gpus <= 0:
      self._declaration[rel_name].underlying_parameters = [None] * gpus
Declare the domain and range types for a relation.

    Args:
      rel_name: string naming a relation
      domain_type: string naming the type of subject entities for the relation
      range_type: string naming the type of object entities for the relation
      trainable: boolean, true if the weights for this relation will be trained
      dense: if true, store data as a dense tensor instead of a SparseTensor
      gpus: number of gpus available for computation

    Raises:
      RelationNameError: If a relation with this name already exists.
    
language/nql/nql/dist.py