def extract_migration_info_from_path(path):
    """
    Extract the migration app and name from a migration path, with format:
        [.../]<app>/<migrations-module>/<migration-name>.py

    Args:
    path (string): migration file path.

    Returns:
    app, name (tuple): migration information
    """
    path_split = path.split("/")
    app = path_split[-3]
    name = path_split[-1].replace(".py", "")
    return app, name