import re


def script_uses_ray(fname):
    """Determine whether a script uses ray."""

    with open(fname, "r") as f:
        text = f.read()
    return bool(re.search("^import ray", text, re.MULTILINE)) or bool(
        re.search("^import scico.ray", text, re.MULTILINE)
    )