code: def test_autoformat():
      dt = datetime(2015, 11, 5, 18, 42, 2, 3)
      s = pd.Series([1, 2, 3])
      df = pd.DataFrame({"a": s})
      assert filter_autoformat(None) == ""
      assert filter_autoformat(dt) == "2015-11-05 18:42:02"
      assert filter_autoformat(0) == "0"
      assert filter_autoformat(10) == "10"
      assert filter_autoformat(-12.3) == "-12.30"
      assert filter_autoformat(-2783428) == "-2.78m"
      assert (
          filter_autoformat(dt, fmt="{%X}")
          == "2015-11-05 18:42:02.000003"
      )
      assert filter_autoformat(s) == str(
          pd.DataFrame(s).T._repr_html_()
      )
      assert filter_autoformat(df) == str(df._repr_html_())
  
file_path: tslumen/tests/unit/test_jinja_utils.py
imports: from datetime import datetime
  import pytest
  import numpy
  import pandas
  import jinja2
  from tslumen.jinja_utils import *
label_desc: Use image node_id 4 for calling a global function with example usage: test_autoformat() without return types