def METHOD_NAME(bucket_name,
                   path,
                   method='GET',
                   expiry=DEFAULT_URL_VALID_SECONDS):
  """Return a signed url."""
  timestamp = _get_expiration_time(expiry)
  blob = '%s\n\n\n%d\n/%s/%s' % (method, timestamp, bucket_name, path)
  local_server = environment.get_value('LOCAL_GCS_SERVER_HOST')
  if local_server:
    url = local_server + '/' + bucket_name
    signed_blob = b'SIGNATURE'
    service_account_name = 'service_account'
  else:
    url = STORAGE_URL % bucket_name
    signed_blob = sign_data(blob.encode('utf-8'))
    service_account_name = utils.service_account_email()
  params = {
      'GoogleAccessId': service_account_name,
      'Expires': timestamp,
      'Signature': base64.b64encode(signed_blob).decode('utf-8'),
  }
  return str(url + '/' + path + '?' + urllib.parse.urlencode(params))