@classmethod<EOL><INDENT>def _internal_assign(cls, args, method):<DEDENT>
inspector = SDKInspector(args.version)<EOL>name = Utils.get_singular_name(args.name)<EOL>object_class = inspector.get_class(name)<EOL>object_type = object_class()<EOL>session = inspector.get_user_session(args)<EOL>resource = inspector.get_parent(args.parent_infos, session.root_object)<EOL>classname = object_class.__name__[<NUM_LIT:2>:]<EOL>plural_classname = Utils.get_entity_name_plural(classname)<EOL>fetcher_name = Utils.get_python_name(plural_classname)<EOL>try:<EOL><INDENT>fetcher = getattr(resource, fetcher_name)<EOL><DEDENT>except:<EOL><INDENT>if resource.rest_name == '<STR_LIT>':<EOL><INDENT>resource_name = '<STR_LIT>'<EOL><DEDENT>error_message = '<STR_LIT>' % (resource_name, fetcher_name)<EOL>Printer.raise_error(error_message)<EOL><DEDENT>(fetcher, resource, current_objects) = fetcher.fetch()<EOL>if current_objects is None:<EOL><INDENT>current_objects = []<EOL><DEDENT>(final_objects, nb_affected_objects) = method(object_class, args.ids, current_objects)<EOL>try:<EOL><INDENT>(references, connection) = resource.assign(final_objects, object_class)<EOL><DEDENT>except Exception as e:<EOL><INDENT>Printer.raise_error('<STR_LIT>' % (name, e))<EOL><DEDENT>if args.ids is None:<EOL><INDENT>args.ids = []<EOL><DEDENT>return (nb_affected_objects, args.name, args.ids, resource.rest_name, resource.id)<EOL>
Execute method to list final assignation
            Returns:
                (nb_affected_objects, assigned_objects_name, assigned_objects_ids, parent_name, parent_id)