<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _filter_execs(self, isSubroutine):
 """Filters the executables in the dictionary by their type."""

        result = {}
        for key in self.executables:
            if (isinstance(self.executables[key], Subroutine) and isSubroutine) or \
               (isinstance(self.executables[key], Function) and not isSubroutine):
                result[key] = self.executables[key]
        
        return result