code: def presigned_url(self, method,
                      bucket_name,
                      object_name,
                      expires=timedelta(days=7),
                      response_headers=None,
                      request_date=None):
          
          is_valid_bucket_name(bucket_name)
          is_non_empty_string(object_name)
  
          if expires.total_seconds() < 1 or \
             expires.total_seconds() > _MAX_EXPIRY_TIME:
              raise InvalidArgumentError('Expires param valid values'
                                         ' are between 1 sec to'
                                         ' {0} secs'.format(_MAX_EXPIRY_TIME))
  
          region = self._get_bucket_region(bucket_name)
          url = get_target_url(self._endpoint_url,
                               bucket_name=bucket_name,
                               object_name=object_name,
                               bucket_region=region)
  
          return presign_v4(method, url,
                            self._access_key,
                            self._secret_key,
                            session_token=self._session_token,
                            region=region,
                            expires=int(expires.total_seconds()),
                            response_headers=response_headers,
                            request_date=request_date)
docs: Presigns a method on an object and provides a url
  
          Example:
              from datetime import timedelta
  
              presignedURL = presigned_url('GET',
                                           'bucket_name',
                                           'object_name',
                                           expires=timedelta(days=7))
              print(presignedURL)
  
          :param bucket_name: Bucket for the presigned url.
          :param object_name: Object for which presigned url is generated.
          :param expires: Optional expires argument to specify timedelta.
                          Defaults to 7days.
          :params response_headers: Optional response_headers argument to
                                    specify response fields like date, size,
                                    type of file, data about server, etc.
          :params request_date: Optional request_date argument to
                                specify a different request date. Default is
                                current date.
          :return: Presigned put object url.