code: def test_sign_unsign(datasette, value, namespace):
      extra_args = [namespace] if namespace else []
      signed = datasette.sign(value, *extra_args)
      assert value != signed
      assert value == datasette.unsign(signed, *extra_args)
      with pytest.raises(BadSignature):
          datasette.unsign(
              signed[:-1] + ("!" if signed[-1] != "!" else ":")
          )
  
file_path: datasette/tests/test_internals_datasette.py
imports: import dataclasses
  from datasette import Forbidden, Context
  from datasette.app import Datasette, Database
  from itsdangerous import BadSignature
  import pytest
  from typing import Optional
label_desc: Use image node_id 4 for calling a global function with example usage: test_sign_unsign(datasette, value, namespace) without return types