code: def is_module_in_pathlist(self, module):
          
          modpath = getattr(module, '__file__', None)
  
          # Skip module according to different criteria
          if modpath is None:
              # *module* is a C module that is statically linked into the
              # interpreter. There is no way to know its path, so we
              # choose to ignore it.
              return True
          elif any([p in modpath for p in self.pathlist]):
              # We don't want to reload modules that belong to the
              # standard library or installed to site-packages,
              # just modules created by the user.
              return True
          elif not os.name == 'nt':
              # Module paths containing the strings below can be ihherited
              # from the default Linux installation, Homebrew or the user
              # site-packages in a virtualenv.
              patterns = [r'^/usr/lib.*',
                          r'^/usr/local/lib.*',
                          r'^/usr/.*/dist-packages/.*',
                          r'^/home/.*/.local/lib.*',
                          r'^/Library/.*',
                          r'^/Users/.*/Library/.*',
                          r'^/Users/.*/.local/.*',
              ]
  
              if [p for p in patterns if re.search(p, modpath)]:
                  return True
              else:
                  return False
          else:
              return False
docs: Decide if a module can be reloaded or not according to its path.