def __init__(self, text=None, type=None, childType=None, partial=False, globalName=None):
        text = text
        type = type
        childType = childType
        self.segments = []
        if isinstance(globalName, GlobalName):
            self.segments = copy.deepcopy(val.segments)
            return
        if text is not None:
            segs = self.segments
            for piece in reversed(text.split('/')):
                match = re.match(r"(.+)<([\w-]+)>$", piece)
                if match:
                    segs.append(Seg(match.group(1), match.group(2)))
                else:
                    segs.append(Seg(piece, None))
            if not partial and (type is not None or childType is not None or segs[0].type is not None):
                self.canonicalize(type=type, childType=childType)
            if self.validate():
                return
        # If I haven't returned yet, something's invalid.
        self.valid = False
Constructs a GlobalName from a string.
dataset/ETHPy150Open tabatkins/bikeshed/bikeshed/globalnames.py/GlobalName.__init__