function isGrouped(declarations) {
            const found = {}

            for (const declaration of declarations) {
                if (getDeclarationType(declaration.init) === DECL_REQUIRE) {
                    found[inferModuleType(declaration.init)] = true
                }
            }

            return Object.keys(found).length <= 1
        }
Check if all require declarations in the given list are of the same
type.
@param {ASTNode} declarations The list of VariableDeclarators.
@returns {boolean} True if the declarations are grouped, false if not.