code: def get_current_revision(
      alembic_config_file: str, verbose: bool = False
  ) -> str:
      output_buffer = io.StringIO()
      alembic_cfg = Config(alembic_config_file, stdout=output_buffer)
  
      command.current(alembic_cfg, verbose=verbose)
      command_result = output_buffer.getvalue().strip()
  
      if verbose:
          return command_result
      return command_result.split(" ")[0]
  
imports: import io
  from alembic import command
  from alembic.config import Config
label_desc: Use image node_id 1 for calling a global function with example usage: get_current_revision(alembic_config_file, verbose) and returns: command_result, command_result