Refactor: scheduler: functionize checking node weight
... to reduce code duplication and improve readability