code: def _list_methods(cls, source=None):
      """For use on immutable objects or with methods returning a copy"""
      return [getattr(cls, k) for k in (source if source else dir(cls))]
  
imports: from inspect import signature, Signature
  from typing import Any, Callable, Dict, Set, Sequence, Tuple, NamedTuple, Type, Literal, Union, TYPE_CHECKING
  import ast
  import builtins
  import collections
  import operator
  import sys
  from functools import cached_property
  from dataclasses import dataclass, field
  from types import MethodDescriptorType, ModuleType
  from IPython.utils.docs import GENERATING_DOCUMENTATION
  from IPython.utils.decorators import undoc
label_desc: Use image node_id 8 for calling a global function with example usage: _list_methods(cls, source) and returns: unknown