def relative_path(path, base_path_file):
    # Check if base_path_file is a string because it might be an AttrDict
    if not os.path.isabs(path) and isinstance(base_path_file, str):
        path = os.path.join(os.path.dirname(base_path_file), path)
    return path
Allocates an IP address based on the request passed in
dataset/ETHPy150Open calliope-project/calliope/calliope/utils.py/relative_path--crossover with--dataset/ETHPy150Open openstack/neutron/neutron/ipam/driver.py/Subnet.allocate