code: def with_group(title):
      """
      If used in GitHub Action, creates an expandable group in the GitHub Action log.
      Otherwise, display simple text groups.
  
      For more information, see:
      https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#grouping-log-lines
      """
      if os.environ.get("GITHUB_ACTIONS", "false") != "true":
          print("#" * 20, title, "#" * 20)
          yield
          return
      print(f"::group::{title}")
      print()
      yield
      print("\033[0m")
      print("::endgroup::")
  
imports: from __future__ import annotations
  import os
  from contextlib import contextmanager
label_desc: Use image node_id 1 for calling a global function with example usage: with_group(title) without return types