def add_method(self, f, name=None):
        assert callable(f), "method argument must be callable"
                            # catches a few programming errors that are
                            # commonly silently swallowed otherwise
        if not name:
            name = f.__name__

        if name in self.method_map:
            raise RPCError('Name %s already registered')

        self.method_map[name] = f
Called from both load_solution() and load_solution_iterative()
dataset/ETHPy150Open mbr/tinyrpc/tinyrpc/dispatch/__init__.py/RPCDispatcher.add_method--crossover with--dataset/ETHPy150Open calliope-project/calliope/calliope/core.py/Model.process_solution