Resolves a volume alias of a container configuration or a tuple of two paths to the host and container paths.

    :param container_map: Container map.
    :type container_map: dockermap.map.config.main.ContainerMap
    :param vol: SharedVolume or HostVolume tuple.
    :type vol: dockermap.map.input.HostVolume | dockermap.map.input.SharedVolume
    :param instance: Optional instance name.
    :type instance: unicode | str
    :return: Tuple of host path and container bind path.
    :rtype: tuple[unicode | str]

def get_shared_volume_path(container_map, vol, instance=None):
    """
    Resolves a volume alias of a container configuration or a tuple of two paths to the host and container paths.

    :param container_map: Container map.
    :type container_map: dockermap.map.config.main.ContainerMap
    :param vol: SharedVolume or HostVolume tuple.
    :type vol: dockermap.map.input.HostVolume | dockermap.map.input.SharedVolume
    :param instance: Optional instance name.
    :type instance: unicode | str
    :return: Tuple of host path and container bind path.
    :rtype: tuple[unicode | str]
    """
    if isinstance(vol, HostVolume):
        c_path = resolve_value(vol.path)
        if is_path(c_path):
            return c_path, get_host_path(container_map.host.root, vol.host_path, instance)
        raise ValueError("Host-container-binding must be described by two paths or one alias name.",
                         vol)
    alias = vol.name
    volume_config = resolve_value(container_map.volumes.get(alias))
    h_path = container_map.host.get_path(alias, instance)
    if volume_config and h_path:
        return volume_config.default_path, h_path
    raise KeyError("No host-volume information found for alias {0}.".format(alias))