import re


def FillForm(string_for_substitution, dictionary_of_vars):
  """
  This function substitutes all matches of the command string //%% ... %%//
  with the variable represented by ...  .
  """
  return_string = string_for_substitution
  for i in re.findall("//%%(.*)%%//", string_for_substitution):
    return_string = re.sub("//%%" + i + "%%//", dictionary_of_vars[i],
                           return_string)
  return return_string