import string


def populate_cypher_query_template_with_values_in_dict(cypher_query_template, dictionary):
    """Populates and Returns a user provided Cypher query with values plucked from a `dictionary`.
    
    Args:
        cypher_query_template (:obj:`string.Template`): string.Template to populate with values.
        dictionary (:obj:`dict`): dict of form { "$"-based substitution: value to be passed to string.Template }.
    
    Return:
        query (:obj:`str`): Input `cypher_query_template` returned with values passed to "$"-based substitutions present.
    """
    if type(cypher_query_template) != string.Template:
        raise TypeError('cypher_query_template parameter must be string.Template.')
    if type(dictionary) != dict:
        raise TypeError('dictionary parameter must be dict.')
    query = cypher_query_template.substitute(dictionary)
    return query