<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(container_map, config, default_volume_paths, include_named):
 """ Generates volume paths for the ``volumes`` argument during container creation. :param container_map: Container map. :type container_map: dockermap.map.config.main.ContainerMap :param config: Container configuration. :type config: dockermap.map.config.container.ContainerConfiguration :param default_volume_paths: Dictionary with volume aliases and their default paths. :type default_volume_paths: dict[unicode | str, unicode | str] :param include_named: Whether to include attached and their re-used volumes. This should be done if Docker supports named volumes; otherwise volumes are inherited from other containers via ``volumes_from``. :type include_named: bool :return: List of shared volume mount points. :rtype: list[unicode | str] """

    def _bind_volume_path(vol):
        if isinstance(vol, HostVolume):
            return resolve_value(vol.path)
        v_path = resolve_value(default_volume_paths.get(vol.name))
        if v_path:
            return v_path
        raise KeyError("No host-volume information found for alias {0}.".format(vol))

    def _attached_volume_path(vol):
        if isinstance(vol, UsedVolume):
            return resolve_value(vol.path)
        v_path = resolve_value(default_volume_paths.get(vol.name))
        if v_path:
            return v_path
        raise KeyError("No volume information found for alias {0}.".format(vol))

    def _used_volume_path(vol):
        if isinstance(vol, UsedVolume):
            return resolve_value(vol.path)
        if container_map.use_attached_parent_name:
            return resolve_value(default_volume_paths.get(vol.name.partition('.')[2]))
        return resolve_value(default_volume_paths.get(vol.name))

    volumes = list(map(resolve_value, config.shares))
    volumes.extend(map(_bind_volume_path, config.binds))
    if include_named:
        volumes.extend(map(_attached_volume_path, config.attaches))
        volumes.extend(filter(None, map(_used_volume_path, config.uses)))
    return volumes