code: def test_from_int():
      df = conversion_data()
      data_id, column_type = "1", "type_conversion"
      i = 0
      build_data_inst({data_id: df})
  
      cfg = {"col": "int", "to": "float", "from": "int"}
      builder = ColumnBuilder(
          data_id, column_type, "Col{}".format(++i), cfg
      )
      verify_builder(builder, lambda col: col.values[0] == 1.0)
  
      cfg = {"col": "int", "to": "str", "from": "int"}
      builder = ColumnBuilder(
          data_id, column_type, "Col{}".format(++i), cfg
      )
      verify_builder(builder, lambda col: col.values[0] == "1")
  
      cfg = {"col": "int", "to": "category", "from": "int"}
      builder = ColumnBuilder(
          data_id, column_type, "Col{}".format(++i), cfg
      )
      verify_builder(builder, lambda col: col.dtype.name == "category")
  
      cfg = {"col": "int", "to": "bool", "from": "int"}
      builder = ColumnBuilder(
          data_id, column_type, "Col{}".format(++i), cfg
      )
      verify_builder(
          builder,
          lambda col: isinstance(col.values[0], np.bool_)
          and np.bool_(True) == col.values[0],
      )
  
      cfg = {
          "col": "int_date",
          "to": "date",
          "from": "int",
          "unit": "YYYYMMDD",
      }
      builder = ColumnBuilder(
          data_id, column_type, "Col{}".format(++i), cfg
      )
      verify_builder(
          builder,
          lambda col: pd.Timestamp(col.values[0]).strftime("%Y%m%d")
          == "20200101",
      )
  
      cfg = {"col": "int_s", "to": "date", "from": "int", "unit": "s"}
      builder = ColumnBuilder(
          data_id, column_type, "Col{}".format(++i), cfg
      )
      verify_builder(
          builder,
          lambda col: pd.Timestamp(col.values[0]).strftime("%Y%m%d")
          == "20170322",
      )
  
      cfg = {"col": "int", "to": "hex", "from": "int"}
      builder = ColumnBuilder(
          data_id, column_type, "Col{}".format(++i), cfg
      )
      verify_builder(builder, lambda col: col.values[0] == "0x1")
  
file_path: dtale/tests/dtale/column_builders/test_type_conversion.py
imports: import numpy
  import pandas
  import pytest
  from dtale.column_builders import ColumnBuilder
  from tests.dtale.column_builders.test_column_builders import verify_builder
  from tests.dtale import build_data_inst
label_desc: Use image node_id 4 for calling a global function with example usage: test_from_int() without return types