code: def test_serialisation_of_pandas_dataframe(tmpdir):
      from sacred.observers.tinydb_hashfs.bases import (
          DataFrameSerializer,
      )
      from sacred.observers.tinydb_hashfs.bases import SeriesSerializer
      from tinydb_serialization import SerializationMiddleware
  
      import numpy as np
      import pandas as pd
  
      # Setup Serialisation object for non list/dict objects
      serialization_store = SerializationMiddleware()
      serialization_store.register_serializer(
          DataFrameSerializer(), "TinyDataFrame"
      )
      serialization_store.register_serializer(
          SeriesSerializer(), "TinySeries"
      )
  
      db = TinyDB(
          os.path.join(tmpdir.strpath, "metadata.json"),
          storage=serialization_store,
      )
  
      df = pd.DataFrame(np.eye(3), columns=list("ABC"))
      series = pd.Series(np.ones(5))
  
      document = {
          "foo": "bar",
          "some_dataframe": df,
          "nested": {"ones": series},
      }
  
      db.insert(document)
      returned_doc = db.all()[0]
  
      assert returned_doc["foo"] == "bar"
      assert (returned_doc["some_dataframe"] == df).all().all()
      assert (returned_doc["nested"]["ones"] == series).all()
  
imports: from __future__ import division, print_function, unicode_literals, absolute_import
  import os
  import datetime
  import tempfile
  import io
  import pytest
  from tinydb import TinyDB
  from hashfs import HashFS
  from sacred.dependencies import get_digest
  from sacred.observers.tinydb_hashfs import TinyDbObserver, tiny_db_option
  from sacred.observers.tinydb_hashfs.bases import BufferedReaderWrapper
  from sacred import optional
  from sacred.experiment import Experiment
label_desc: Use image node_id 19 for calling a global function with example usage: test_serialisation_of_pandas_dataframe(tmpdir) without return types