docs: def bind_theano(device=None, max_usage=USAGE_THRESHOLD, verbose=True):
      '''
      Initialize Theano to use a certain device. If `device` is None (the
      default), use the device returned by calling `best_gpu`
      with the same parameters.
  
      This needs to be called *before* importing Theano. Currently (Dec 2015)
      Theano has no way of switching devices after it is bound (which happens
      on import).
      '''
      if device is None:
          device = best_gpu(max_usage, verbose=verbose)
      if device and device != 'cpu':
          import unittest
          try:
              import theano.sandbox.cuda
              theano.sandbox.cuda.use(device)
          except (ImportError, unittest.case.SkipTest):
              import theano.gpuarray
              theano.gpuarray.use(device.replace('gpu', 'cuda'))