<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_volumes_from(container_map, config_name, config, policy, include_volumes):
 """ Generates volume paths for the host config ``volumes_from`` argument during container creation. :param container_map: Container map. :type container_map: dockermap.map.config.main.ContainerMap :param config_name: Container configuration name. :type config_name: unicode | str :param config: Container configuration. :type config: dockermap.map.config.container.ContainerConfiguration :param policy: Base policy for generating names and determining volumes. :type policy: dockermap.map.policy.base.BasePolicy :param include_volumes: Whether to include attached and their re-used volumes. This should not be done if Docker supports named volumes, because these are included in ``volumes`` with their paths. :type include_volumes: bool :return: List of shared volume mount points. :rtype: list[unicode | str] """

    aname = policy.aname
    cname = policy.cname
    map_name = container_map.name
    volume_names = set(policy.default_volume_paths[map_name].keys())

    def container_name(u_name):
        uc_name, __, ui_name = u_name.partition('.')
        return cname(map_name, uc_name, ui_name)

    def volume_or_container_name(u_name):
        if u_name in volume_names:
            if container_map.use_attached_parent_name:
                v_parent_name, __, attached_name = u_name.partition('.')
                return aname(map_name, attached_name, v_parent_name)
            return aname(map_name, u_name)
        return container_name(u_name)

    def volume_str(name, readonly):
        if readonly:
            return '{0}:ro'.format(name)
        return name

    use_attached_parent_name = container_map.use_attached_parent_name
    if include_volumes:
        volumes_from = [volume_str(volume_or_container_name(u.name), u.readonly)
                        for u in config.uses]
        a_parent_name = config_name if use_attached_parent_name else None
        volumes_from.extend([aname(map_name, attached.name, a_parent_name)
                             for attached in config.attaches])
        return volumes_from

    if use_attached_parent_name:
        return [volume_str(container_name(u.name), u.readonly)
                for u in config.uses
                if u.name.partition('.')[2] not in volume_names]
    return [volume_str(container_name(u.name), u.readonly)
            for u in config.uses
            if u.name not in volume_names]