def METHOD_NAME(self):
    # Converting string device filter to list
    device_filter = self._task.args.get("device_filter")
    if device_filter is not None and not isinstance(device_filter, list):
        display.debug(f"device_filter must be of type list, got '{device_filter}' of type {type(device_filter)} instead. Converting...")
        self._task.args["device_filter"] = [device_filter]