parameters: (backend_name, device_id)
return_statement: return None
docstring: Retrieves a specific device given its backend name and device id.
docstring_summary: Retrieves a specific device given its backend name and device id.
docstring_tokens: Retrieves a specific device given its backend name and device id .
function: def GetDevice(backend_name, device_id):
    """Retrieves a specific device given its backend name and device id."""
    backend = GetBackend(backend_name)
    if not backend:
      return None
    for device in backend.EnumerateDevices():
      if device.id == device_id:
        return device
    return None
function_tokens: def GetDevice ( backend_name , device_id ) : backend = GetBackend ( backend_name ) if not backend : return None for device in backend . EnumerateDevices ( ) : if device . id == device_id : return device return None