<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_contrib_features(module):
 """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 """


    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')