<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _do_merge(self, global_value, local_value):
 """ Actually perform the merge operation for the given inputs. This method is used as part of the recursion. Therefore input values can be of any type. So is the output. :param global_value: Global value to be merged :param local_value: Local value to be merged :return: Merged result """


        token_global = self._token_of(global_value)
        token_local = self._token_of(local_value)

        # The following statements codify the rules explained in the doctring above
        if token_global != token_local:
            return self._prefer_local(global_value, local_value)

        elif self.TOKEN.PRIMITIVE == token_global == token_local:
            return self._prefer_local(global_value, local_value)

        elif self.TOKEN.DICT == token_global == token_local:
            return self._merge_dict(global_value, local_value)

        elif self.TOKEN.LIST == token_global == token_local:
            return self._merge_lists(global_value, local_value)

        else:
            raise TypeError(
                "Unsupported type of objects. GlobalType={}, LocalType={}".format(token_global, token_local))