code: def test_add_fieldarray(self):
      ds = DataSet({"x": [[1, 2, 3, 4]] * 40, "y": [[5, 6]] * 40})
      ds.add_fieldarray("z", FieldArray("z", [[7, 8]] * 40))
      assert ds["z"].content == [[7, 8]] * 40
  
      with pytest.raises(RuntimeError):
          ds.add_fieldarray("z", FieldArray("z", [[7, 8]] * 10))
  
      with pytest.raises(TypeError):
          ds.add_fieldarray("z", [1, 2, 4])
  
imports: import os
  import pytest
  import numpy
  from fastNLP.core.dataset import DataSet, FieldArray, Instance, ApplyResultException
  from fastNLP import logger
label_desc: Use image node_id 9 for calling the TestDataSetMethods obj's underlying member method code with example usage: obj.test_add_fieldarray() without return types