code: def import_with_column_names_types():
      # upload file with headers in the csv
      csvWithHeader = h2o.import_file(
          pyunit_utils.locate(
              "smalldata/airlines/allyears2k_headers.zip"
          ),
          header=1,
      )
      allColnames = csvWithHeader.names
      allTypeDict = csvWithHeader.types
  
      # upload file with  no header but fixed column types.
      csvWithNoHeader = h2o.upload_file(
          pyunit_utils.locate("smalldata/airlines/allyears2k.zip"),
          header=-1,
      )
      allNewColnames = csvWithNoHeader.names
      allNewTypeDict = csvWithNoHeader.types
      pathNoHeader = pyunit_utils.locate(
          "smalldata/airlines/allyears2k.zip"
      )
  
      # load in whole dataset
      skip_even = list(range(0, csvWithHeader.ncol, 2))
      skip_odd = list(range(1, csvWithHeader.ncol, 2))
      skip_start_end = [0, csvWithHeader.ncol - 1]
      skip_except_last = list(range(0, csvWithHeader.ncol - 2))
      skip_except_first = list(range(1, csvWithHeader.ncol))
      temp = list(range(0, csvWithHeader.ncol))
      random.shuffle(temp)
      skip_random = []
      for index in range(0, csvWithHeader.ncol // 2):
          skip_random.append(temp[index])
      skip_random.sort()
  
      # skip even
      checkCorrectSkipAndNameTypes(
          csvWithHeader,
          pathNoHeader,
          skip_even,
          allColnames,
          allTypeDict,
          0,
          0,
      )
  
      # skip odd
      checkCorrectSkipAndNameTypes(
          csvWithNoHeader,
          pathNoHeader,
          skip_odd,
          allNewColnames,
          allNewTypeDict,
          1,
          0,
      )
  
      # skip start and end
      checkCorrectSkipAndNameTypes(
          csvWithHeader,
          pathNoHeader,
          skip_start_end,
          allColnames,
          allTypeDict,
          2,
          0,
      )
  
      # keep last
      checkCorrectSkipAndNameTypes(
          csvWithNoHeader,
          pathNoHeader,
          skip_except_last,
          allNewColnames,
          allNewTypeDict,
          0,
          0,
      )
  
      # keep first
      checkCorrectSkipAndNameTypes(
          csvWithHeader,
          pathNoHeader,
          skip_except_first,
          allColnames,
          allTypeDict,
          1,
          0,
      )
  
      # random skip
      checkCorrectSkipAndNameTypes(
          csvWithNoHeader,
          pathNoHeader,
          skip_random,
          allNewColnames,
          allNewTypeDict,
          2,
          0,
      )
  
imports: import sys
  import h2o
  from tests import pyunit_utils
  import random
label_desc: Use image node_id 1 for calling a global function with example usage: import_with_column_names_types() without return types