<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_python(self, path):
 """Test whether argument path is a Python script."""

        head, tail = os.path.splitext(path)
        return tail.lower() in (".py", ".pyw")