code: def test_basic(self):
      from ..data_structures.sframe_builder import SFrameBuilder
  
      sf_data = list(zip(*self.all_type_cols))
  
      sb = SFrameBuilder(self.all_types)
      for i in sf_data:
          sb.append(i)
      sf = sb.close()
      _assert_sframe_equal(sf, self.sf_all_types)
  
      sb = SFrameBuilder(self.all_types)
      sb.append_multiple(sf_data)
      sf = sb.close()
      _assert_sframe_equal(sf, self.sf_all_types)
  
      ## mismatched input size
      sb = SFrameBuilder(self.all_types)
      with self.assertRaises(RuntimeError):
          sb.append(sf_data[0][:-2])
  
      sb = SFrameBuilder(self.all_types)
      with self.assertRaises(RuntimeError):
          extra_data = list(sf_data[0])
          extra_data.append(10)
          sb.append(extra_data)
  
      sb = SFrameBuilder(self.all_types)
      sf_data_extra = list(zip(*(self.all_type_cols + [self.int_data])))
      with self.assertRaises(RuntimeError):
          sb.append_multiple(sf_data_extra)
  
      sb = SFrameBuilder(self.all_types)
      sf_data_missing = sf_data[:-2]
      with self.assertRaises(RuntimeError):
          sb.append(sf_data_missing)
  
      ## type cannot be converted to target type
      sb = SFrameBuilder(self.all_types)
      # maks sure we replace the type int to str
      assert type(self.all_type_cols[0][0]) is int
      sf_data_wrong_type = list(
          zip(self.string_data, *self.all_type_cols[1:])
      )
      with self.assertRaises(TypeError):
          sb.append_multiple(sf_data_wrong_type[0])
  
      sb = SFrameBuilder(self.all_types)
      with self.assertRaises(TypeError):
          sb.append_multiple(sf_data_wrong_type)
  
file_path: turicreate/src/python/turicreate/test/test_sframe_builder.py
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  from ..data_structures.sframe import SFrame
  import unittest
  import array
  import datetime
  from .._cython.cy_flexible_type import GMT
  from ..util import _assert_sframe_equal
  import pytest
label_desc: Use image node_id 2 for calling the SFrameBuilderTest obj's underlying member method code with example usage: obj.test_basic() without return types