class_docstr: Strategy for how to shard (split) the work.
class_docstr_tok: ["Strategy","for","how","to","shard","(","split",")","the","work","."]
docstr: Valid ``spec``\s are:
  
  - ``no``: No sharding will happen, and a single run of this script does all necessary work.
  - ``<i>/<n>``, where 0 <= i < n: Build a subset of notebooks, corresponding to job ``i`` out
    of ``n``.
  - ``collect``: Collect data generated by previous shards, and finish the work.
docstr_tok: ["Valid","``","spec","``","\\s","are",":","-","``","no","``",":","No","sharding","will","happen",",","and","a","single","run","of","this","script","does","all","necessary","work",".","-","``","<","i",">","\/","<","n",">","``",",","where","0","<","=","i","<","n",":","Build","a","subset","of","notebooks",",","corresponding","to","job","``","i","``","out","of","``","n","``",".","-","``","collect","``",":","Collect","data","generated","by","previous","shards",",","and","finish","the","work","."]
code: def __init__(self, spec: str) -> None:
      """
      Valid ``spec``\s are:
  
      - ``no``: No sharding will happen, and a single run of this script does all necessary work.
      - ``<i>/<n>``, where 0 <= i < n: Build a subset of notebooks, corresponding to job ``i`` out
        of ``n``.
      - ``collect``: Collect data generated by previous shards, and finish the work.
      """
      self.spec = spec
      if spec == "no":
          self.setup_tmp = True
          self.build_notebooks = True
          self.build_other = True
          self.shard_i = 0
          self.shard_n = 1
      elif spec == "collect":
          self.setup_tmp = False
          self.build_notebooks = False
          self.build_other = True
          self.shard_i = 0
          self.shard_n = 1
      else:
          i_str, n_str = spec.split("/")
          self.setup_tmp = False
          self.build_notebooks = True
          self.build_other = False
          self.shard_i = int(i_str)
          self.shard_n = int(n_str)
      assert 0 <= self.shard_i < self.shard_n, (
          self.shard_i,
          self.shard_n,
      )
  
file_path: GPflow/doc/build_docs.py
imports: import argparse
  import json
  import shutil
  import subprocess
  from datetime import datetime
  from itertools import chain
  from pathlib import Path
  from time import perf_counter
  from typing import Collection, Optional, Union
  from generate_module_rst import generate_module_rst
  from tabulate import tabulate
  from versions import Branch
  import gpflow
label_desc: Use image node_id 1 to create a new ShardingStrategy object  with example: obj = ShardingStrategy(spec)