code: def _filter_execs(self, isSubroutine):
          
          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
docs: Filters the executables in the dictionary by their type.