<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_string(cls, link):
 """Return a new SheetUrl instance from parsed URL string. <SheetUrl id='spam' gid=0> """

        ma = cls._pattern.search(link)
        if ma is None:
            raise ValueError(link)
        id = ma.group('id')
        return cls(id)