def METHOD_NAME(self, mode: str) -> Mode:
    """Get a mode from the network by its *mode_name*"""
    self.__update_list_of_modes()
    self.curr.execute(f"select mode_id from 'modes' where mode_name='{mode}'")
    found = self.curr.fetchone()
    if len(found) == 0:
        raise ValueError(f"Mode {mode} does not exist in the model")
    return Mode(found[0], self.project)