def METHOD_NAME(self, tp, *args):
    func_name = f'get_{tp}s'
    data = []
    if hasattr(self, func_name):
        try:
            data = getattr(self, func_name)(*args)
        except ApiException as e:
            logger.error(e.reason)
    if self.server:
        self.server.stop()
    return data