code: def sequence_to_str(seq: Sequence, separate_last: str = "") -> str:
      if not seq:
          return ""
      if len(seq) == 1:
          return f"'{seq[0]}'"
  
      head = "'" + "', '".join([str(item) for item in seq[:-1]]) + "'"
      tail = f"{'' if separate_last and len(seq) == 2 else ','} {separate_last}'{seq[-1]}'"
  
      return head + tail
  
file_path: vision/torchvision/_utils.py
imports: import enum
  from typing import Sequence, Type, TypeVar
label_desc: Use image node_id 1 for calling a global function with example usage: sequence_to_str(seq, separate_last) and returns: unknown, str, str, seq, str