code: def test_to_proto():
      assert (
          ViewType.to_proto(ViewType.ACTIVE_ONLY)
          == service_pb2.ACTIVE_ONLY
      )
      assert (
          ViewType.to_proto(ViewType.DELETED_ONLY)
          == service_pb2.DELETED_ONLY
      )
      assert ViewType.to_proto(ViewType.ALL) == service_pb2.ALL
  
imports: from mlflow.entities import ViewType
  from mlflow.protos import service_pb2
label_desc: Use image node_id 1 for calling a global function with example usage: test_to_proto() without return types