code: def _format_dict(
      attr: Dict[Any, Any],
      indent: int,
      width: int,
      curr_indent: int,
  ) -> str:
      curr_indent += indent + 3
      dict_repr = []
      for k, v in attr.items():
          k_repr = repr(k)
          v_str = (
              _pformat(v, indent, width, curr_indent + len(k_repr))
              if is_dataclass(v)
              else repr(v)
          )
          dict_repr.append(f"{k_repr}: {v_str}")
  
      return _format(dict_repr, indent, width, curr_indent, "{", "}")
  
imports: import contextlib
  import functools
  import hashlib
  import os
  import re
  import sys
  import textwrap
  from argparse import Namespace
  from dataclasses import fields, is_dataclass
  from enum import auto, Enum
  from typing import Any, Callable, Dict, Generic, Iterable, Iterator, List, Literal, NoReturn, Optional, Sequence, Set, Tuple, TypeVar, Union
  from typing_extensions import Self
  from torchgen.code_template import CodeTemplate
label_desc: Use image node_id 11 for calling a global function with example usage: _format_dict(attr, indent, width, curr_indent) and returns: _format