async def METHOD_NAME(
    self, filter_by_state: set[RunningState] | None = None
) -> METHOD_NAME[CompRunsAtDB]:
    if not filter_by_state:
        filter_by_state = set()
    runs_in_db: deque[CompRunsAtDB] = deque()
    async with self.db_engine.acquire() as conn:
        async for row in conn.execute(
            sa.select(comp_runs).where(
                or_(
                    *[
                        comp_runs.c.result == RUNNING_STATE_TO_DB[s]
                        for s in filter_by_state
                    ]
                )
            )
        ):
            runs_in_db.append(CompRunsAtDB.from_orm(row))
    return METHOD_NAME(runs_in_db)