#NEWLINE# def find_module( self , module_name , package_path ) : #NEWLINE# #INDENT# 'This function is part of interface defined in import hooks PEP-0302\n        Given the name of the module its goal is to locate it. If shellpy module with the name was found,\n        self is returned as Loader for this module. Otherwise None is returned and standard python import\n        works as expected\n\n        :param module_name: the module to locate\n        :param package_path: part of interface, not used, see PEP-0302\n        :return: self if shellpy module was found, None if not\n        ' #NEWLINE# if ( module_name . find ( '.' ) == ( - 1 ) ) : #NEWLINE# #INDENT# root_module_name = module_name #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# root_module_name = module_name . split ( '.' ) [ 0 ] #NEWLINE# #UNINDENT# spy_module_path = locator . locate_spy_module ( root_module_name ) #NEWLINE# spy_file_path = locator . locate_spy_file ( root_module_name ) #NEWLINE# if ( ( spy_module_path is not None ) or ( spy_file_path is not None ) ) : #NEWLINE# #INDENT# return self #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return None