<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_modelnames() -> List[str]: """Return a sorted |list| containing all application model names. """

        return sorted(str(fn.split('.')[0])
                      for fn in os.listdir(models.__path__[0])
                      if (fn.endswith('.py') and (fn != '__init__.py')))