def modes(id = nil, _options = {})
      id = nil if id.is_a?(Hash)
      if id
        _modes[id]
      else
        _modes.ids
      end
    end
def modes(id = nil, _options = {})
      id = nil if id.is_a?(Hash)
      if id
        _modes[id]
      else
        _modes.ids
      end
    end
Returns an array containing the IDs of all known modes if no ID is supplied,
 otherwise returns an object representing the given mode ID