{
 "action": "Replace the old line with the new one; the rest of the code can stay.",
 "alternatives": [],
 "applicability": {
  "exit_code": 0,
  "line": 10,
  "method": "literal_patch",
  "occurrences": 1,
  "output": "same",
  "patched_sha": "ebc6a7843a31",
  "reason": "applied word for word, the patch parses, drops the old names, runs on 3.7 and prints what the verified example prints",
  "run_on": "3.7",
  "status": "applies"
 },
 "by_notes": true,
 "changelog_ref": {
  "quote": "Expire random lobster dep ([#8499](https://github.com/networkx/networkx/pull/8499)).",
  "url": "https://github.com/networkx/networkx/releases"
 },
 "confirmations": {
  "failed": 0,
  "worked": 6
 },
 "detect": [
  "nx.random_lobster"
 ],
 "ecosystem": "pypi",
 "equivalence": "same",
 "error_kind": "missing_attr",
 "error_signature": {
  "message": "module 'networkx' has no attribute 'random_lobster'",
  "norm": "missing_attr:random_lobster",
  "type": "AttributeError"
 },
 "first_seen": "2026-10-20T16:11:13+00:00",
 "format": "replace",
 "format_version": 2,
 "id": "pypi/networkx/3.7/0001",
 "kind": "removed",
 "license": "https://creativecommons.org/licenses/by/4.0/",
 "package": "networkx",
 "proof": {
  "applicability": {
   "exit_code": 0,
   "line": 10,
   "method": "literal_patch",
   "occurrences": 1,
   "output": "same",
   "patched_sha": "ebc6a7843a31",
   "reason": "applied word for word, the patch parses, drops the old names, runs on 3.7 and prints what the verified example prints",
   "run_on": "3.7",
   "status": "applies"
  },
  "auto_apply": true,
  "auto_apply_reason": "proof.equivalent is true and the patch applies word for word",
  "auto_apply_rule": "Automatic application is allowed only when proof.equivalent is true and proof.applicability.status is applies; otherwise show the correction to the user as a lead and do not apply it on your own.",
  "equivalence": "same",
  "equivalent": true,
  "fails_on": "3.7",
  "fixed_on": "3.7",
  "level": "differential",
  "method": {
   "fix_on": "3.7",
   "name": "stdout_match",
   "normalization": "lines stripped, blank lines dropped, runs of whitespace collapsed; memory addresses, timestamps and temporary paths masked",
   "original_on": "3.6.1",
   "scope": "the observable stdout of one example script; return values, files, other inputs and exception types are not compared, so a match is not a proof of equivalent behaviour"
  },
  "script_right": "import networkx as nx\n\n# Note: in networkx, `n` is the *expected* number of backbone nodes;\n# the actual backbone length is drawn randomly around this value.\nn = 20\np1 = 0.9  # probability of adding an edge at the first level (backbone -> leaf)\np2 = 0.9  # probability of adding an edge at the second level (leaf -> leaf)\nseed = 42\n\nG = nx.random_lobster_graph(n, p1, p2, seed=seed)\n\nnum_nodes = G.number_of_nodes()\nnum_edges = G.number_of_edges()\n\ntry:\n    is_tree = nx.is_tree(G)\nexcept nx.NetworkXPointlessConcept:\n    # Raised for the null graph (no nodes)\n    is_tree = False\n\nprint(f\"Number of nodes: {num_nodes}\")\nprint(f\"Number of edges: {num_edges}\")\nprint(f\"Is a tree: {is_tree}\")",
  "script_wrong": "import networkx as nx\n\n# Note: in networkx, `n` is the *expected* number of backbone nodes;\n# the actual backbone length is drawn randomly around this value.\nn = 20\np1 = 0.9  # probability of adding an edge at the first level (backbone -> leaf)\np2 = 0.9  # probability of adding an edge at the second level (leaf -> leaf)\nseed = 42\n\nG = nx.random_lobster(n, p1, p2, seed=seed)\n\nnum_nodes = G.number_of_nodes()\nnum_edges = G.number_of_edges()\n\ntry:\n    is_tree = nx.is_tree(G)\nexcept nx.NetworkXPointlessConcept:\n    # Raised for the null graph (no nodes)\n    is_tree = False\n\nprint(f\"Number of nodes: {num_nodes}\")\nprint(f\"Number of edges: {num_edges}\")\nprint(f\"Is a tree: {is_tree}\")",
  "works_on": "3.6.1"
 },
 "right": "G = nx.random_lobster_graph(n, p1, p2, seed=seed)",
 "seen_in_models": [
  "claude-sonnet-5-5",
  "gemini-3.8-flash",
  "gpt-6.1-sol"
 ],
 "seq": 1,
 "slug": "random-lobster",
 "source": "pipeline",
 "symbol": "random_lobster",
 "updated": "2026-10-27T17:20:00+00:00",
 "url": "https://formachines.ai/errata/pypi/networkx/0001-random-lobster/",
 "variant_confirmations": 6,
 "variant_models": [
  "claude-sonnet-5-5",
  "gemini-3.8-flash",
  "gpt-6.1-sol"
 ],
 "verified": "sandbox",
 "versions": {
  "changed_in": ">3.6.1,<=3.7",
  "fails_on": "3.7",
  "works_on": "3.6.1"
 },
 "wrong": "G = nx.random_lobster(n, p1, p2, seed=seed)"
}