<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cfdv32mx(config):
 """Format cfdi v3.2 for Mexico. \b File where the files will be written document.xml. cfdicli --in_file /path/to/yout/json/documnt.json cfdv32mx \b File where the files will be written from document.json. cfdicli --out_file ./document.xml cfdv32mx """

    # TODO: look for a secure option for eval.
    #       Or simply the CLI only should manage json?
    # TODO: Implement json option also.
    dict_input = eval(config.in_file.read())
    invoice = cfdv32.get_invoice(dict_input)
    if invoice.valid:
        config.out_file.write(invoice.document)
        config.out_file.flush()
        click.echo('Document %s has been created.' % config.out_file.name)
    else:
        click.echo(invoice.ups.message)