from typing import Dict


def _add_sub_path(arg: Dict, sub_paths: Dict) -> Dict:
    """Add the sub_path field to an argument."""
    name = arg['name'].replace('-', '_')
    if name in sub_paths:
        arg['sub_path'] = sub_paths[name]

    return arg