def METHOD_NAME(data):
    if data is None:
        return None
    result = [0, 0]
    if torch.is_tensor(data):
        if torch.isnan(data).any():
            result[0] = 1
        if torch.isinf(data).any():
            result[1] = 1
    elif type(data) is tuple:
        for i in range(len(data)):
            if torch.is_tensor(data[i]):
                if torch.isnan(data[i]).any():
                    result[0] += 1
                if torch.isinf(data[i]).any():
                    result[1] += 1
        if result[0] > 0:
            result[0] += 10
        if result[1] > 0:
            result[1] += 10
    return result if sum(result) > 0 else None