<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_program(name):
 """ Uses the shell program "which" to determine whether the named program is available on the shell PATH. """

    with open(os.devnull, "w") as null:
        try:
            subprocess.check_call(("which", name), stdout=null, stderr=null)
        except subprocess.CalledProcessError as e:
            return False
    return True