Could tighten this up to something like:

    return [
        child for child in module.get_children()
        if not submodule_type or child_module.scope_ids.block_type == submodule_type
    ]