code: def FromString(cls, string_rep):
          
  
          rep = str(string_rep)
  
          rep = rep.replace(u'node', '')
          rep = rep.replace(u'nodes', '')
  
          if rep.startswith(u'all'):
              parts = rep.split()
  
              spec_string = u''
  
              if len(parts) == 3:
                  spec_string = parts[1]
                  stream_type = parts[2]
              elif len(parts) == 2:
                  stream_type = parts[1]
              else:
                  raise ArgumentError("Invalid wildcard stream selector", string_rep=string_rep)
  
              try:
                  # Remove pluralization that can come with e.g. 'all system outputs'
                  if stream_type.endswith(u's'):
                      stream_type = stream_type[:-1]
  
                  stream_type = DataStream.StringToType[stream_type]
              except KeyError:
                  raise ArgumentError("Invalid stream type given", stream_type=stream_type, known_types=DataStream.StringToType.keys())
  
              stream_spec = DataStreamSelector.SpecifierNames.get(spec_string, None)
              if stream_spec is None:
                  raise ArgumentError("Invalid stream specifier given (should be system, user, combined or blank)", string_rep=string_rep, spec_string=spec_string)
  
              return DataStreamSelector(stream_type, None, stream_spec)
  
          # If we're not matching a wildcard stream type, then the match is exactly
          # the same as a DataStream identifier, so use that to match it.
  
          stream = DataStream.FromString(rep)
          return DataStreamSelector.FromStream(stream)
docs: Create a DataStreamSelector from a string.
  
          The format of the string should either be:
  
          all <type>
          OR
          <type> <id>
  
          Where type is [system] <stream type>, with <stream type>
          defined as in DataStream
  
          Args:
              rep (str): The string representation to convert to a DataStreamSelector