<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def merge_context(self, tag, metadata):
 """ merge into contextManagerFrame new entity and metadata. Appends tag as new entity and adds keys in metadata to keys in self.metadata. Args: tag(str):
 entity to be added to self.entities metadata(object):
 metadata containes keys to be added to self.metadata """

        self.entities.append(tag)
        for k in metadata.keys():
            if k not in self.metadata:
                self.metadata[k] = k