code: def test_convert_unsupported_types_to_supported(
      sagemaker_session_mock,
  ):
      feature_group = FeatureGroup(
          name="FailedGroup", sagemaker_session=sagemaker_session_mock
      )
      df = pd.DataFrame(
          {
              "float": pd.Series([2.0], dtype="float64"),
              "int": pd.Series([2], dtype="int64"),
              "object": pd.Series(["f1"], dtype="object"),
          }
      )
      # Converting object or O type to string
      df = _cast_object_to_string(data_frame=df)
  
      feature_definitions = feature_group.load_feature_definitions(
          data_frame=df
      )
      types = [fd.feature_type for fd in feature_definitions]
  
      assert types == [
          FeatureTypeEnum.FRACTIONAL,
          FeatureTypeEnum.INTEGRAL,
          FeatureTypeEnum.STRING,
      ]
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/feature_store/test_feature_utils.py
imports: from __future__ import absolute_import
  import pandas
  import pytest
  from mock import Mock
  from sagemaker.feature_store.feature_utils import _cast_object_to_string, prepare_fg_from_dataframe_or_file, get_feature_group_as_dataframe
  from sagemaker.feature_store.feature_definition import FeatureTypeEnum
  from sagemaker.feature_store.feature_group import FeatureGroup
label_desc: Use image node_id 2 for calling a global function with example usage: test_convert_unsupported_types_to_supported(sagemaker_session_mock) without return types