code: def as_factor(self, key, column, timeoutSecs=60):
      assert key is not None, 'FAIL: "key" parameter is null'
      assert column is not None, 'FAIL: "column" parameter is null'
  
      # quote column names; leave integer column indexes alone
      if isinstance(column, str):
          column = '"' + column + '"'
  
      params_dict = {
          "ast": "(assign {0} (:= {0} (as.factor (cols_py {0} {1})) {1} []))".format(
              key, column
          )
      }
      result = self.__do_json_request(
          "/99/Rapids",
          cmd="post",
          timeout=timeoutSecs,
          postData=params_dict,
      )
      return result
  
imports: import sys, os, getpass, logging, time, inspect, requests, json, pprint
  import h2o_test_utils
  from h2o_test_utils import log, log_rest
  import h2o_print
label_desc: Use image node_id 20 for calling the H2O obj's underlying member method code with example usage: obj.as_factor(key, column, timeoutSecs) and returns: result