Collect all argument attributes into a dictionary with attribute name to its value.
It instance is a list, it works like list(map(as_dict, instance)).
- Parameters:
instance (list[T] | T) – any instance that contains argument.
- Returns:
A dictionary mapping argument attribute names to their values
- Return type:
list[dict[str, Any]] | dict[str, Any]