def set(self, instance, value, **kw):
if not isinstance(value, (list, tuple)):<EOL><INDENT>value = [value]<EOL><DEDENT>uids = []<EOL>for item in value:<EOL><INDENT>uid = None<EOL>if isinstance(item, dict):<EOL><INDENT>uid = item.get("<STR_LIT>")<EOL><DEDENT>if api.is_uid(value):<EOL><INDENT>uid = item<EOL><DEDENT>if uid is None:<EOL><INDENT>logger.warn("<STR_LIT>")<EOL>continue<EOL><DEDENT>uids.append(uid)<EOL><DEDENT>analyses = map(api.get_object_by_uid, uids)<EOL>self._set(instance, analyses, **kw)<EOL>
Set Analyses to an AR

:param instance: Analysis Request
:param value: Single AS UID or a list of dictionaries containing AS UIDs
:param kw: Additional keyword parameters passed to the field