code: def represent_list(self, data):
      """Compact lists"""
      flow_style = not any(isinstance(i, dict) for i in data)
      return self.represent_sequence(
          "tag:yaml.org,2002:seq", data, flow_style=flow_style
      )
  
imports: import json
  import re
  import warnings
  from textwrap import dedent
  import nbformat
  import yaml
  from .cell_to_text import three_backticks_or_more
label_desc: Use image node_id 7 for calling a global function with example usage: represent_list(data) and returns: self