def parse_port_spec_item_string(spec, cur_package=None):
    spec = spec.strip()
    spec_arr = spec.split(':', 2)
    if len(spec_arr) > 2:
        # switch format of spec to more natural
        # <package>:<namespace>|<name> for descriptor parsing
        spec = '%s:%s|%s' % (spec_arr[0], spec_arr[2], spec_arr[1])
    return parse_descriptor_string(spec, cur_package)
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/core/modules/utils.py/parse_port_spec_item_string/original