def parse_map(self, obj, mapping=None, *args, **kwargs):
mapping = mapping or obj._mapping<EOL>if "<STR_LIT:data>" in kwargs:<EOL><INDENT>for k, v in mapping.items():<EOL><INDENT>if kwargs["<STR_LIT:data>"].get(v, None) is not None:<EOL><INDENT>val = kwargs["<STR_LIT:data>"][v]<EOL><DEDENT>else:<EOL><INDENT>val = None<EOL><DEDENT>self.add_attr(obj, k, val, from_json=True)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>for k, v in mapping.items():<EOL><INDENT>if k in kwargs:<EOL><INDENT>self.add_attr(obj, k, kwargs[k])<EOL><DEDENT><DEDENT><DEDENT>
Parses a dictionary of (model_attr, json_attr) items