code: def _get_bucket_location(self, bucket_name):
          
          method = 'GET'
          url = self._endpoint_url + '/' + bucket_name + '?location='
          headers = {}
          # default for all requests.
          region = 'us-east-1'
  
          # Region is set override.
          if self._region:
              return self._region
  
          # For anonymous requests no need to get bucket location.
          if self._access_key is None or self._secret_key is None:
              return 'us-east-1'
  
          # Get signature headers if any.
          headers = sign_v4(method, url, region,
                            headers, self._access_key,
                            self._secret_key,
                            self._session_token,
                            None)
  
          response = self._http.urlopen(method, url,
                                        body=None,
                                        headers=headers)
  
          if self._trace_output_stream:
              dump_http(method, url, headers, response,
                        self._trace_output_stream)
  
          if response.status != 200:
              raise ResponseError(response, method, bucket_name).get_exception()
  
          location = parse_location_constraint(response.data)
          # location is empty for 'US standard region'
          if not location:
              return 'us-east-1'
          # location can be 'EU' convert it to meaningful 'eu-west-1'
          if location == 'EU':
              return 'eu-west-1'
          return location
docs: Get bucket location.
  
          :param bucket_name: Fetches location of the Bucket name.
          :return: location of bucket name is returned.