def METHOD_NAME(self, trid, msg):
    try:
        result = self.__transports[trid][0].sendData(S_ERROR(msg))
        if not result["OK"]:
            return result
    except KeyError:
        return S_ERROR(f"No transport with id {trid} defined")
    finally:
        self.close(trid)