code: def _get_migrate_funcs(cls, orig_version, target_version):
  		
  		direction = 1 if target_version > orig_version else -1
  		versions = range(orig_version, target_version + direction, direction)
  		transitions = recipes.pairwise(versions)
  		return itertools.starmap(cls._get_func, transitions)
docs: >>> @Manager.register
  		... def v1_to_2(manager, doc):
  		...     doc['foo'] = 'bar'
  		>>> @Manager.register
  		... def v2_to_1(manager, doc):
  		...     del doc['foo']
  		>>> @Manager.register
  		... def v2_to_3(manager, doc):
  		...     doc['foo'] = doc['foo'] + ' baz'
  		>>> funcs = list(Manager._get_migrate_funcs(1, 3))
  		>>> len(funcs)
  		2
  		>>> funcs == [v1_to_2, v2_to_3]
  		True
  		>>> funcs = list(Manager._get_migrate_funcs(2, 1))
  		>>> len(funcs)
  		1
  		>>> funcs == [v2_to_1]
  		True
  
  		>>> Manager._upgrade_funcs.clear()