code: def get_config_by_bucket(self, bucket, host=None):
      try:
          return next(
              bucket_config
              for bucket_config in self._buckets
              if (bucket, host) == bucket_config.get_bucket_host()
          )
      except StopIteration:
          pass
  
      return None
  
imports: import abc
  import warnings
  from copy import copy
  from operator import itemgetter
  from os import getenv
  import furl
  import six
  from attr import attrib, attrs
label_desc: Use image node_id 5 for calling the S3BucketConfigurations obj's underlying member method code with example usage: obj.get_config_by_bucket(bucket, host) and returns: None, next