def eval_expressions(expressions, locals_dict):
     vals = []
     drilldown_args = []
     name_error = False
     for expr in expressions:
         val = AccountingNone
         drilldown_arg = None
         if expr:
             if expr.kpi_id.budgetable:
                 val = kpi_data.get(expr, AccountingNone)
                 drilldown_arg = {"period_id": period.id, "expr_id": expr.id}
             elif expr.name:
                 val = mis_safe_eval(expr.name, locals_dict)
                 if isinstance(val, NameDataError):
                     name_error = True
         vals.append(val)
         drilldown_args.append(drilldown_arg)
     return vals, drilldown_args, name_error
 def eval_expressions(expressions, locals_dict):
     vals = []
     drilldown_args = []
     name_error = False
     for expr in expressions:
         val = AccountingNone
         drilldown_arg = None
         if expr:
             if expr.kpi_id.budgetable:
                 val = kpi_data.get(expr, AccountingNone)
                 drilldown_arg = {
                     'period_id': period.id,
                     'expr_id': expr.id,
                 }
             elif expr.name:
                 val = mis_safe_eval(expr.name, locals_dict)
         vals.append(val)
         drilldown_args.append(drilldown_arg)
     return vals, drilldown_args, name_error