<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def find_language(script, exts=None):
 """Determine the script's language extension True If exts are given they restrict which extensions are allowed True If there is no extension, but shebang is present, then use that (Expecting to find "#!" in ~/.bashrc for this test, but ~/.bashrc might not exist - then there's no language) True """

    if not script.isfile():
        return None
    if script.ext:
        return ext_language(script.ext, exts)
    shebang = script.shebang()
    return shebang and str(shebang.name) or None