code: def test_file_path(tmp_path):
      label_file = tmp_path / "label_names.txt"
      # Empty lines are ignored
      content = textwrap.dedent(
          """
        label1
  
  
        label0
        """
      )
      label_file.write_text(content)
  
      # Both Path and str are supported
      labels = features.ClassLabel(names_file=label_file)
      labels_2 = features.ClassLabel(names_file=str(label_file))
      assert labels.names == labels_2.names
      assert labels.names == ["label1", "label0"]
  
file_path: datasets/tensorflow_datasets/core/features/class_label_feature_test.py
imports: import textwrap
  import tensorflow
  from tensorflow_datasets import testing
  from tensorflow_datasets.core import features
label_desc: Use image node_id 1 for calling a global function with example usage: test_file_path(tmp_path) without return types