<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pygal_parser(preprocessor, tag, markup):
 """ Simple pygal parser """

    # Find JSON payload
    data = loads(markup)
    if tag == 'pygal' and data is not None:
        # Run generation of chart
        output = run_pygal(data)
        # Return embedded SVG image
        return '<div class="pygal" style="text-align: center;"><embed type="image/svg+xml" src=%s style="max-width:1000px"/></div>' % output

    else:
        raise ValueError('Error processing input. \nExpected syntax: {0}'.format(SYNTAX))