code: def test_filter_dateformat():
      dt = datetime(2015, 11, 5, 18, 42, 2, 3)
      assert filter_dateformat(dt) == "2015-11-05 18:42:02"
      assert filter_dateformat(dt, fmt="{:%y}") == "15"
      assert filter_dateformat(dt, freq="A") == "2015"
      assert filter_dateformat(dt, freq="Q") == "2015-11"
      assert filter_dateformat(dt, freq="M") == "2015-11"
      assert filter_dateformat(dt, freq="W") == "2015-11-05 (w44)"
      assert filter_dateformat(dt, freq="D") == "2015-11-05"
      assert filter_dateformat(dt, freq="B") == "2015-11-05"
      assert filter_dateformat(dt, freq="H") == "2015-11-05 18:42"
      assert (
          filter_dateformat(dt, freq="NOT A FREQ")
          == "2015-11-05 18:42:02"
      )
  
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 2 for calling a global function with example usage: test_filter_dateformat() without return types