<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def build_pdf(path_jinja2, template_name, path_outfile, template_kwargs=None):
    '''Helper function for building a pdf from a latex jinja2 template

    :param path_jinja2: the root directory for latex jinja2 templates
    :param template_name: the relative path, to path_jinja2, to the desired
        jinja2 Latex template
    :param path_outfile: the full path to the desired final output file
        Must contain the same file extension as files generated by
        cmd_wo_infile, otherwise the process will fail
    :param template_kwargs: a dictionary of key/values for jinja2 variables
    '''
    latex_template_object = LatexBuild(
            path_jinja2,
            template_name,
            template_kwargs,
            )
    return latex_template_object.build_pdf(path_outfile)