def _resolve_absolute_dir(dr, base_input_dir):
    """Resolve the directory to its absolute path based on the 
    base directory `base_input_dir`.

    Returns:
        directory path [string]
    """
    if dr.startswith(base_input_dir):
        data_dir = dr
    else:
        data_dir = f'{base_input_dir}/{dr}'

    return data_dir