def add(self, f, name=None, types=None, required=None):
        if name is None:
            fname = f.__name__  # Register the function using its own name.
        else:
            fname = name

        self.method_data[fname] = {'method': f}

        if types is not None:
            self.method_data[fname]['types'] = types

            if required is not None:
                self.method_data[fname]['required'] = required
Adds a new method to the jsonrpc service.
dataset/ETHPy150Open flowroute/txjason/txjason/service.py/JSONRPCService.add