def Register(self, a, b, migrated_entity):
    """Registers a merge mapping.

    If a and b are both not None, this means that entities a and b were merged
    to produce migrated_entity. If one of a or b are not None, then it means
    it was not merged but simply migrated.

    The effect of a call to register is to update a_merge_map and b_merge_map
    according to the merge. Also the private attributes _migrated_entity of a
    and b are set to migrated_entity.

    Args:
      a: The entity from the old feed or None.
      b: The entity from the new feed or None.
      migrated_entity: The migrated entity.
    """
    # There are a few places where code needs to find the corresponding
    # migrated entity of an object without knowing in which original schedule
    # the entity started. With a_merge_map and b_merge_map both have to be
    # checked. Use of the _migrated_entity attribute allows the migrated entity
    # to be directly found without the schedule.  The merge maps also require
    # that all objects be hashable. GenericGTFSObject is at the moment, but
    # this is a bug. See comment in transitfeed.GenericGTFSObject.
    if a is not None:
      self.a_merge_map[a] = migrated_entity
      a._migrated_entity = migrated_entity
    if b is not None:
      self.b_merge_map[b] = migrated_entity
      b._migrated_entity = migrated_entity
Registers a merge mapping.

    If a and b are both not None, this means that entities a and b were merged
    to produce migrated_entity. If one of a or b are not None, then it means
    it was not merged but simply migrated.

    The effect of a call to register is to update a_merge_map and b_merge_map
    according to the merge. Also the private attributes _migrated_entity of a
    and b are set to migrated_entity.

    Args:
      a: The entity from the old feed or None.
      b: The entity from the new feed or None.
      migrated_entity: The migrated entity.