code: def get_buckets(self, transport, bucket_type=None, timeout=None):
          
          if not riak.disable_list_exceptions:
              raise ListError()
  
          _validate_timeout(timeout)
  
          if bucket_type:
              bucketfn = self._bucket_type_bucket_builder
          else:
              bucketfn = self._default_type_bucket_builder
  
          return [bucketfn(bytes_to_str(name), bucket_type) for name in
                  transport.get_buckets(bucket_type=bucket_type,
                                        timeout=timeout)]
docs: get_buckets(bucket_type=None, timeout=None)
  
          Get the list of buckets as :class:`RiakBucket
          <riak.bucket.RiakBucket>` instances.
  
          .. warning:: Do not use this in production, as it requires
             traversing through all keys stored in a cluster.
  
          .. note:: This request is automatically retried :attr:`retries`
             times if it fails due to network error.
  
          :param bucket_type: the optional containing bucket type
          :type bucket_type: :class:`~riak.bucket.BucketType`
          :param timeout: a timeout value in milliseconds
          :type timeout: int
          :rtype: list of :class:`RiakBucket <riak.bucket.RiakBucket>`
                  instances