code: def test_format_grid(unittest):
      output = utils.format_grid(
          pd.DataFrame(
              [dict(a=1, b="foo", c=3.5, d=pd.Timestamp("20190101"))]
          )
      )
      unittest.assertEqual(
          output,
          {
              "results": [
                  {"a": 1, "c": 3.5, "b": "foo", "d": "2019-01-01"}
              ],
              "columns": [
                  {"dtype": "int64", "name": "a"},
                  {"dtype": "string", "name": "b"},
                  {"dtype": "float64", "name": "c"},
                  {"dtype": "datetime64[ns]", "name": "d"},
              ],
          },
          "should format dataframe correctly",
      )
  
file_path: dtale/tests/dtale/test_utils.py
imports: from collections import namedtuple
  import mock
  import numpy
  import pandas
  import pytest
  from six import PY3
  import dtale.utils
  from tests import ExitStack
label_desc: Use image node_id 4 for calling a global function with example usage: test_format_grid(unittest) without return types