code: def register(func_path, factory=mock.MagicMock):
      # type: (str, Callable) -> Callable
      
      global _factory_map
      _factory_map[func_path] = factory
  
      def decorator(decorated_factory):
          _factory_map[func_path] = decorated_factory
          return decorated_factory
  
      return decorator
docs: Kwargs:
          func_path: import path to mock (as you would give to `mock.patch`)
          factory: function that returns a mock for the patched func
  
      Returns:
          (decorator)
  
      Usage:
  
          automock.register('path.to.func.to.mock')  # default MagicMock
          automock.register('path.to.func.to.mock', CustomMockFactory)
  
          @automock.register('path.to.func.to.mock')
          def custom_mock(result):
              return mock.MagicMock(return_value=result)