code: def test_info_err(runner):
      """Trying to get info of a directory raises an exception"""
      result = runner.invoke(main_group, ["info", "tests"])
      assert result.exit_code != 0
      assert result.exception
  
imports: import json
  import pytest
  import rasterio
  from rasterio.rio.main import main_group
  from .conftest import credentials
label_desc: Use image node_id 2 for calling a global function with example usage: test_info_err(runner) without return types