code: def _build_master(cls):
          
          ws = cls()
          try:
              from __main__ import __requires__
          except ImportError:
              # The main program does not list any requirements
              return ws
  
          # ensure the requirements are met
          try:
              ws.require(__requires__)
          except VersionConflict:
              return cls._build_from_requirements(__requires__)
  
          return ws
docs: Prepare the master working set.