def get_type_item(self, value):
        """
        Converts the input to a NetworkEndpoint tuple. It can be from a single-entry dictionary, single string, list, or
        tuple. Single values (also single-element lists or tuples) are considered a network name. Dictionaries can also
        contain nested dictionaries with keyword arguments to the NetworkEndpoint. Lists / tuples of length 2 are also
        checked for such dictionaries.

        :param value: Input value for conversion.
        :return: NetworkEndpoint tuple.
        :rtype: NetworkEndpoint
        """
        if isinstance(value, NetworkEndpoint):
            return value
        elif isinstance(value, six.string_types + (lazy_type,)):
            return NetworkEndpoint(value)
        elif isinstance(value, (list, tuple)):
            v_len = len(value)
            if v_len == 2 and isinstance(value[1], dict):
                return NetworkEndpoint(value[0], **value[1])
            elif 1 <= v_len <= 6:
                return NetworkEndpoint(*value)
            raise ValueError("Invalid element length; only dictionaries, pr tuples and lists of length 1-6 can be "
                             "converted to a NetworkEndpoint tuple. Found length {0}.".format(v_len))
        elif isinstance(value, dict):
            d_len = len(value)
            if d_len == 1:
                k, v = list(value.items())[0]
                if k == 'network_name':
                    return NetworkEndpoint(v)
                if not v:
                    return NetworkEndpoint(k)
                if isinstance(v, six.string_types):
                    return NetworkEndpoint(k, v)
                v_len = len(v)
                if isinstance(v, dict):
                    return NetworkEndpoint(k, **v)
                elif isinstance(v, (list, tuple)):
                    if 1 <= v_len <= 5:
                        return NetworkEndpoint(k, *v)
                    raise ValueError("Invalid sub-element length; lists and tuples of length 1-5 can be converted. "
                                     "Found length {0}.".format(v_len))
                raise ValueError(
                    "Invalid sub-element format; only dicts and tuples of length 1-5 can be converted. Found "
                    "type {0}.".format(type(value).__name__))
            return NetworkEndpoint(**value)
        raise ValueError(
            "Invalid type; expected a dict, list, tuple, or string type, found {0}.".format(type(value).__name__))
Converts the input to a NetworkEndpoint tuple. It can be from a single-entry dictionary, single string, list, or
        tuple. Single values (also single-element lists or tuples) are considered a network name. Dictionaries can also
        contain nested dictionaries with keyword arguments to the NetworkEndpoint. Lists / tuples of length 2 are also
        checked for such dictionaries.

        :param value: Input value for conversion.
        :return: NetworkEndpoint tuple.
        :rtype: NetworkEndpoint