code: def test_get_column_analysis_frequency(unittest):
      import dtale.views as views
  
      df = pd.DataFrame(
          dict(
              a=[1, 1, 1, 1, 2, 2, 2, 2],
              b=[3, 3, 4, 4, 5, 5, 6, 6],
              c=[1, 2, 3, 4, 5, 6, 7, 8],
          )
      )
      with app.test_client() as c:
          build_data_inst({c.port: df})
          build_dtypes({c.port: views.build_dtypes_state(df)})
          settings = {c.port: {}}
          build_settings(settings)
          response = c.get(
              "/dtale/column-analysis/{}".format(c.port),
              query_string=dict(col="a", type="frequency"),
          )
          response_data = response.get_json()
          unittest.assertEqual(
              response_data["data"],
              {
                  "Frequency": [4, 4],
                  "Percent": [50.0, 50.0],
                  "a": [1, 2],
              },
          )
  
          response = c.get(
              "/dtale/column-analysis/{}".format(c.port),
              query_string=dict(col="a", type="frequency", splits="b"),
          )
          response_data = response.get_json()
          unittest.assertEqual(
              response_data["data"],
              {
                  "Frequency": [2, 2, 2, 2],
                  "Percent": [50.0, 50.0, 50.0, 50.0],
                  "a": [1, 1, 2, 2],
                  "b": [3, 4, 5, 6],
              },
          )
  
file_path: dtale/tests/dtale/test_column_analysis.py
imports: import mock
  import numpy
  import os
  import pandas
  import pytest
  import dtale.global_state
  from tests.dtale.test_views import app
  from tests import ExitStack
  from tests.dtale import build_data_inst, build_settings, build_dtypes
label_desc: Use image node_id 7 for calling a global function with example usage: test_get_column_analysis_frequency(unittest) without return types