<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_bucket_endpoint(self):
 """ Queries S3 to identify the region hosting the provided bucket. """

        conn = S3Connection()
        bucket = conn.lookup(self.bucket_name)
        if not bucket:
            # TODO: Make the bucket here?
            raise InputParameterError('The provided bucket %s doesn\'t exist' % self.bucket_name)
        endpoint = str(bucket.get_location())
        return endpoint