def build_context(self,
                    context_factory=nql.NeuralQueryContext,
                    gpus=1,
                    params=None):
    """Create a new NeuralQueryContext and configure it.

    Args:
      context_factory: factory to construct the NQL context
      gpus: number of gpus available for computation
      params: optional parameters to be passed to config_context

    Returns:
      The newly configured context.
    """
    if gpus <= 1:
      context = context_factory()
    else:
      context = context_factory(gpus=gpus)
    self.config_context(context, params)
    return context
Create a new NeuralQueryContext and configure it.

    Args:
      context_factory: factory to construct the NQL context
      gpus: number of gpus available for computation
      params: optional parameters to be passed to config_context

    Returns:
      The newly configured context.
    
language/nql/nql/util.py