def require_device_memory(obj):
 if (not is_device_memory(obj)):
  raise Exception('Not a CUDA memory object.')

def require_device_memory ( obj ) : if ( not is_device_memory ( obj ) ) : raise Exception ( 'Not a CUDA memory object.' )
a sentry for methods that accept cuda memory object .