<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse(cls, ss):
 """ Parses an existing connection string This method will return a :class:`~.ConnectionString` object which will allow further inspection on the input parameters. :param string ss: The existing connection string :return: A new :class:`~.ConnectionString` object """


        up = urlparse(ss)
        path = up.path
        query = up.query

        if '?' in path:
            path, _ = up.path.split('?')

        if path.startswith('/'):
            path = path[1:]

        bucket = path
        options = parse_qs(query)
        scheme = up.scheme
        hosts = up.netloc.split(',')
        return cls(bucket=bucket, options=options, hosts=hosts, scheme=scheme)