code: def eval_fieldnames(string_, varname="fieldnames"):
      
      ff = eval(string_)
      if not isinstance(ff, list):
          raise RuntimeError("{0!s} must be a list".format(varname))
      if not all([isinstance(x, str) for x in ff]):
          raise RuntimeError("{0!s} must be a list of strings".format(varname))
      ff = [x.upper() for x in ff]
      return ff
docs: Evaluates string_, must evaluate to list of strings. Also converts field names to uppercase