def METHOD_NAME(algoName: str, item: algorithms.CausalRequest, response: Response) -> I.CausalAlgorithmResponse:
    try:
        method: I.AlgoInterface = algorithms.DICT.get(algoName)(item.dataSource, item.fields, item.params)
        print("causal", item.params, item.focusedFields, item.bgKnowledgesPag)
        data = method.calc(item.params, item.focusedFields, bgKnowledgesPag=item.bgKnowledgesPag, funcDeps=item.funcDeps)
        response_data = I.CausalAlgorithmData(
            orig_matrix=data.get('data'),
            matrix=data.get('matrix', data.get('data')),
            fields=data.get('fields'),
            extra={ 'debug': data if debug else "" }
        )
        return I.CausalAlgorithmResponse(
            success=True,
            data=response_data
        )
    except Exception as e:
        msg = traceback.format_exc()
        print(msg, file=sys.stderr)
        response.status_code = status.HTTP_400_BAD_REQUEST
        return I.CausalAlgorithmResponse(
            success=False,
            message=str(e)
        )