def append_url_params(base_url, param_dict):
    """Append parameters to a base url.

  Args:
    base_url: the basic url, end with ?
    param_dict: dictionary of parameters.
  Returns:
    a complete url.
  """
    url = base_url
    started = False
    for key, val in param_dict.iteritems():
        if val is not None:
            url = url + '&' if started else url
            url += '{}={}'.format(key, val)
            started = True
    return url
