code: def test_convert_value_scalar():
      int64_feature = feature_lib.Scalar(dtype=np.int64)
      assert (
          huggingface_dataset_builder._convert_value(42, int64_feature)
          == 42
      )
  
      int32_feature = feature_lib.Scalar(dtype=np.int32)
      assert (
          huggingface_dataset_builder._convert_value(42, int32_feature)
          == 42
      )
  
      string_feature = feature_lib.Scalar(dtype=np.object_)
      assert (
          huggingface_dataset_builder._convert_value(
              "abc", string_feature
          )
          == "abc"
      )
  
      bool_feature = feature_lib.Scalar(dtype=np.bool_)
      assert huggingface_dataset_builder._convert_value(
          True, bool_feature
      )
      assert not huggingface_dataset_builder._convert_value(
          False, bool_feature
      )
  
      float_feature = feature_lib.Scalar(dtype=np.float32)
      assert (
          huggingface_dataset_builder._convert_value(
              42.0, float_feature
          )
          == 42.0
      )
  
imports: import datetime
  from unittest import mock
  from absl import logging
  import numpy
  import pytest
  import tensorflow
  from tensorflow_datasets.core import features
  from tensorflow_datasets.core import lazy_imports_lib
  from tensorflow_datasets.core import registered
  from tensorflow_datasets.core.dataset_builders import huggingface_dataset_builder
label_desc: Use image node_id 6 for calling a global function with example usage: test_convert_value_scalar() without return types