code: def test_creation_and_hydration():
      path = random_str(random_int(10, 50))
      is_dir = random_int(10, 2500) % 2 == 0
      size_in_bytes = random_int(1, 10000)
      fi1 = FileInfo(path, is_dir, size_in_bytes)
      _check(fi1, path, is_dir, size_in_bytes)
  
      as_dict = {
          "path": path,
          "is_dir": is_dir,
          "file_size": size_in_bytes,
      }
      assert dict(fi1) == as_dict
  
      proto = fi1.to_proto()
      fi2 = FileInfo.from_proto(proto)
      _check(fi2, path, is_dir, size_in_bytes)
  
      fi3 = FileInfo.from_dictionary(as_dict)
      _check(fi3, path, is_dir, size_in_bytes)
  
imports: from mlflow.entities import FileInfo
  from tests.helper_functions import random_int, random_str
label_desc: Use image node_id 2 for calling a global function with example usage: test_creation_and_hydration() without return types