code: def _get_contrib_features(module):
      
  
      if isinstance(module, types.ModuleType):
          # any module that has a __path__ attribute is also a package
          if hasattr(module, '__path__'):
              yield from _get_contrib_features_from_package(module)
          else:
              yield _get_contrib_feature_from_module(module)
      else:
          raise ValueError('Input is not a module')
docs: Get contributed features from within given module
  
      Be very careful with untrusted code. The module/package will be
      walked, every submodule will be imported, and all the code therein will be
      executed. But why would you be trying to import from an untrusted package
      anyway?
  
      Args:
          contrib (module): module (standalone or package) that contains feature
              definitions
  
      Returns:
          List[Feature]: list of features