def is_executable(elem, kernel) -> bool:
    """
    Return whether a block can be executed.
    Must be Code or a CodeBlock, and must not have ``eval=False`` in the block
    arguments, and ``lang`` (kernel_name) must be specified and not None
    """
    return (
        "eval" not in elem.attributes or elem.attributes["eval"] is not False
    ) and kernel is not None