code: def from_sys_requirements(cls, system_requirements, _type='all'):
          
          if _type not in ('all', 'clusterSpec', 'instanceType'):
              raise DXError("Expected '_type' to be either 'all', 'clusterSpec', or 'instanceType'")
  
          if _type == 'all':
              return cls(system_requirements)
  
          extracted = defaultdict(dict)
          for entrypoint, req in system_requirements.items():
              if _type in req:
                  extracted[entrypoint][_type] = req[_type]
          return cls(dict(extracted))
docs: Returns SystemRequirementsDict encapsulating system requirements.
          It can extract only entrypoints with specific fields ('clusterSpec',
          'instanceType', etc), depending on the value of _type.