def init_target_object(self, target, data):
target_object = self.init_single_object(target, data.pop(target, data))<EOL>for key, item in data.items():<EOL><INDENT>key_alias = MANAGER_ALIASES.get(key, key)<EOL>if item:<EOL><INDENT>if isinstance(item, str):<EOL><INDENT>children = item<EOL><DEDENT>else:<EOL><INDENT>first_key = list(item.keys())[<NUM_LIT:0>]<EOL>if isinstance(item[first_key], OrderedDict):<EOL><INDENT>instances = item.values()<EOL>if len(instances) > <NUM_LIT:1>:<EOL><INDENT>children = [self.init_single_object(key_alias, instance) for instance in instances]<EOL><DEDENT>else:<EOL><INDENT>children = self.init_single_object(key_alias, list(instances)[<NUM_LIT:0>])<EOL><DEDENT><DEDENT>else:<EOL><INDENT>children = self.init_single_object(key_alias, item)<EOL><DEDENT><DEDENT>setattr(target_object, key.lower(), children)<EOL><DEDENT>else:<EOL><INDENT>setattr(target_object, key.lower(), None)<EOL><DEDENT><DEDENT>return target_object<EOL>
Initializes target object and assign extra objects to target as attributes