code: def test_invalid_per_sample_length(self, cost_manager):
      costs = [
          np.array([1, 2, 3, 4, 5]),
          np.array([2, 3, 4, 5, 1]),
      ]
      with pytest.raises(Exception):
          cost_manager.add(
              ["AveRooms", "Population"],
              treatment_cost=costs,
              skip_cat_limit_checks=True,
          )
          cost_manager.compute()
  
imports: import os
  from unittest.mock import ANY, patch
  import numpy
  import pytest
  from raiutils.exceptions import UserConfigValidationException
  from raiutils.models import ModelTask
  from responsibleai import RAIInsights
  from responsibleai._interfaces import CausalData
  from responsibleai._internal.constants import FileFormats
  from responsibleai._tools.shared.state_directory_management import DirectoryManager
  from responsibleai.managers.causal_manager import CausalManager
label_desc: Use image node_id 7 for calling the TestCausalManagerTreatmentCosts obj's underlying member method code with example usage: obj.test_invalid_per_sample_length(cost_manager) without return types