<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _module_to_base_modules(s):
 """return all module names that would be imported due to this import-import """

    parts = s.split('.')
    for i in range(1, len(parts)):
        yield '.'.join(parts[:i])