def METHOD_NAME(keys, accessor):
    """Build an output string of the form
    {
      a = foo,
      b = bar
    }
    where a and b are elements of keys and foo and bar are values of
    accessor (e.g., accessor['a'] = foo).
    Note that accessor need not be a dictionary (i.e., gdb.Values
    redefines __getitem__)."""
    return ("{\n" +
            ",\n".join(["  {} = {}".format(key, accessor[key])
                        for key in keys]) +
            "\n}")