code: def test_click_based_commands():
      assert custom_handler("build") is False
      assert custom_handler("build -f") is True
  
      assert custom_handler("benchmark --name strings") == "strings"
      with pytest.raises(CommandError):
          assert custom_handler("benchmark")
  
      assert custom_handler("extra", extra="data") == {"extra": "data"}
  
imports: import json
  import os
  from unittest import mock
  from unittest.mock import Mock
  import click
  import pytest
  import responses
  from archery.bot import CommentBot, CommandError, PullRequestState, PullRequestWorkflowBot, group
label_desc: Use image node_id 8 for calling a global function with example usage: test_click_based_commands() without return types