code: def format_object_attrs(obj):
      """
      Return a list of tuples of the (attr, formatted_value)
      for common attrs, including dtype, name, length
  
      Parameters
      ----------
      obj : object
          must be iterable
  
      Returns
      -------
      list
  
      """
      attrs = []
      if hasattr(obj, "dtype"):
          attrs.append(("dtype", "'{}'".format(obj.dtype)))
      if getattr(obj, "name", None) is not None:
          attrs.append(("name", default_pprint(obj.name)))
      max_seq_items = get_option("display.max_seq_items") or len(obj)
      if len(obj) > max_seq_items:
          attrs.append(("length", len(obj)))
      return attrs
  
file_path: catboost/contrib/python/pandas/py2/pandas/io/formats/printing.py
imports: import sys
  from pandas.compat import u
  from pandas.core.dtypes.inference import is_sequence
  from pandas import compat
  from pandas.core.config import get_option
label_desc: Use image node_id 10 for calling a global function with example usage: format_object_attrs(obj) and returns: attrs