<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_inside(self, file_path):
 # type: (str) -> bool """ If .py, yes. If extensionless, open file and check shebang TODO: support variations on this: #!/usr/bin/env python :param file_path: :return: """

        if file_path.endswith(".py"):
            return True  # duh.

        # not supporting surprising extensions, ege. .py2, .python, .corn_chowder

        # extensionless
        if "." not in file_path:
            try:
                firstline = self.open_this(file_path, "r").readline()
                if firstline.startswith("#") and "python" in firstline:
                    return True
            except:
                pass
        return False