def remove_new_stat_vars(stat_vars, client):
    """ Removes Statistical Variables that do not already exist. 

  Pulls the existing StatVar list from production and makes sure that no new
  statistical variables are added. This function is used in the event that you
  need to refresh a file dependent on this generation, but do not want to
  fully refresh the statistical variable list.

  Args:
    stat_vars: The dataframe of statistical variable with 
    HumanReadableNames generated.
    client: An authenticated BigQuery client.
  """
    stat_vars_query = """
  SELECT distinct id FROM
  `google.com:datcom-store-dev.dc_kg_2020_07_12_01_01_43.Instance`
  WHERE type = "StatisticalVariable"
  """
    existing_stat_vars = client.query(stat_vars_query).to_dataframe()['id']
    return stat_vars[stat_vars['HumanReadableName'].isin(existing_stat_vars)]