<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def bucket(cls, bucket_name, connection=None):
 """Gives the bucket from couchbase server. :param bucket_name: Bucket name to fetch. :type bucket_name: str :returns: couchbase driver's Bucket object. :rtype: :class:`couchbase.client.Bucket` :raises: :exc:`RuntimeError` If the credentials wasn't set. """

        connection = cls.connection if connection == None else connection


        if bucket_name not in cls._buckets:
            connection = "{connection}/{bucket_name}".format(connection=connection, bucket_name=bucket_name)

            if cls.password:
                cls._buckets[connection] = Bucket(connection, password=cls.password)
            else:
                cls._buckets[connection] = Bucket(connection)

        return cls._buckets[connection]