class_docstr: Smoke tests for the Python examples found on the homepage to ensure
  that they do not break.
code: def testErdosRenyiComponents(self):
      g = Graph.Erdos_Renyi(n=300, m=250)
      colors = [
          "lightgray",
          "cyan",
          "magenta",
          "yellow",
          "blue",
          "green",
          "red",
      ]
      components = g.components()
      for component in components:
          color = colors[min(6, len(components) - 1)]
          g.vs[component]["color"] = color
  
      # No plotting here, but we calculate the FR layout
      g.layout("fr")
  
file_path: python-igraph/tests/test_homepage.py
imports: import unittest
  from igraph import Graph, Layout
label_desc: Use image node_id 1 for calling the HomepageExampleTests obj's underlying member method code with example usage: obj.testErdosRenyiComponents() without return types