<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_all_fields(obj):
 """Returns a list of all field names on the instance."""

    fields = []
    for f in obj._meta.fields:
        fname = f.name

        get_choice = "get_" + fname + "_display"
        if hasattr(obj, get_choice):
            value = getattr(obj, get_choice)()
        else:
            try:
                value = getattr(obj, fname)
            except Exception:
                value = None

        if isinstance(value, list):
            value = ",".join(str(v) for v in value)

        if f.editable and value and f.name:
            fields.append(
                {"label": f.verbose_name, "name": f.name, "value": value}
            )

    return fields