def _insert_eval(rule):
    """
   inserts eval(expr=RULE) for rules that are expresssions and not functions

   # todo: make both single and double quotation marks work (use single now?)
   Example:
       rb.add("df.groupby('pid')['gender'].nunique()<2")
   becomes
       rb.add("evaluate(expr="df.groupby('pid')['gender'].nunique()<2")")
   why?
       standardize all rules: always start with a function
       easier to code with it
   """
    if rule.startswith('df.'):
        rule = f'evaluate(expr="{rule}")'
    elif rule.split('(')[0] in globals():
        pass
    else:
        rule = f'evaluate(expr="{rule}")'
    return rule
