code: def test_negative_offsets():
      x_offset = [42, 65]
      x_factor = [-1975, 1964]
      y_offset = [-4, 2, 1.784]
      y_factor = [2, 1.5, 1.3]
  
      with pytest.raises(ValueError) as excinfo:
          scaling = OffsetScaling(
              offset_inputs=x_offset,
              factor_inputs=x_factor,
              offset_outputs=y_offset,
              factor_outputs=y_factor,
          )
      assert (
          str(excinfo.value)
          == "OffsetScaling only accepts positive values"
          " for factor_inputs. Negative value found at"
          " index 0."
      )
  
      x_offset = [42, 65]
      x_factor = [1975, 1964]
      y_offset = [-4, 2, 1.784]
      y_factor = [2, -1.5, 1.3]
  
      with pytest.raises(ValueError) as excinfo:
          scaling = OffsetScaling(
              offset_inputs=x_offset,
              factor_inputs=x_factor,
              offset_outputs=y_offset,
              factor_outputs=y_factor,
          )
      assert (
          str(excinfo.value)
          == "OffsetScaling only accepts positive values"
          " for factor_outputs. Negative value found at"
          " index 1."
      )
  
file_path: OMLT/tests/test_scaling.py
imports: import numpy
  import pytest
  from omlt import OffsetScaling
  from omlt.scaling import convert_to_dict
label_desc: Use image node_id 4 for calling a global function with example usage: test_negative_offsets() without return types