def get_type_item(self, value):
        """
        Converts the input to a ``SharedVolume`` or ``HostVolume`` tuple for a host bind. Input can be a single string, a
        list or tuple, or a single-entry dictionary.
        Single values are assumed to be volume aliases for read-write access. Tuples or lists with two elements, can be
        ``(alias, read-only indicator)``, or ``(container path, host path)``. The latter is assumed, unless the second
        element is boolean or a string of either ``ro`` or ``rw``, indicating read-only or read-write access for a volume
        alias. Three elements are always used as ``(container path, host path, read-only indicator)``.
        Nested values are unpacked, so that valid input formats are also ``{container path: (host path, read-only)}`` or
        ``(container_path: [host path, read-only])``.

        :param value: Input value for conversion.
        :return: A SharedVolume tuple
        :rtype: SharedVolume
        """
        if isinstance(value, (HostVolume, SharedVolume)):
            return value
        elif isinstance(value, six.string_types):
            return SharedVolume(value, False)
        elif isinstance(value, (list, tuple)):
            return _shared_host_volume_from_tuple(*value)
        elif isinstance(value, dict):
            v_len = len(value)
            if v_len == 1:
                k, v = list(value.items())[0]
                if k == 'name':
                    return SharedVolume(v)
                elif isinstance(v, (list, tuple)):
                    return _shared_host_volume_from_tuple(k, *v)
                return _shared_host_volume_from_tuple(k, v)
            elif 'path' in value:
                return HostVolume(**value)
            return SharedVolume(**value)
        raise ValueError(
            "Invalid type; expected a list, tuple, dict, or string type, found {0}.".format(type(value).__name__))
def get_type_item ( self , value ) : if isinstance ( value , ( HostVolume , SharedVolume ) ) : return value elif isinstance ( value , six . string_types ) : return SharedVolume ( value , False ) elif isinstance ( value , ( list , tuple ) ) : return _shared_host_volume_from_tuple ( * value ) elif isinstance ( value , dict ) : v_len = len ( value ) if v_len == 1 : k , v = list ( value . items ( ) ) [ 0 ] if k == 'name' : return SharedVolume ( v ) elif isinstance ( v , ( list , tuple ) ) : return _shared_host_volume_from_tuple ( k , * v ) return _shared_host_volume_from_tuple ( k , v ) elif 'path' in value : return HostVolume ( ** value ) return SharedVolume ( ** value ) raise ValueError ( "Invalid type; expected a list, tuple, dict, or string type, found {0}." . format ( type ( value ) . __name__ ) )
Converts the input to a ``SharedVolume`` or ``HostVolume`` tuple for a host bind. Input can be a single string, a
        list or tuple, or a single-entry dictionary.
        Single values are assumed to be volume aliases for read-write access. Tuples or lists with two elements, can be
        ``(alias, read-only indicator)``, or ``(container path, host path)``. The latter is assumed, unless the second
        element is boolean or a string of either ``ro`` or ``rw``, indicating read-only or read-write access for a volume
        alias. Three elements are always used as ``(container path, host path, read-only indicator)``.
        Nested values are unpacked, so that valid input formats are also ``{container path: (host path, read-only)}`` or
        ``(container_path: [host path, read-only])``.

        :param value: Input value for conversion.
        :return: A SharedVolume tuple
        :rtype: SharedVolume