code: def detect(byte_string):
      
  
      if not isinstance(byte_string, byte_cls):
          raise TypeError(unwrap(
              '''
              byte_string must be a byte string, not %s
              ''',
              _type_name(byte_string)
          ))
  
      return byte_string.find(b'-----BEGIN') != -1 or byte_string.find(b'---- BEGIN') != -1
docs: Detect if a byte string seems to contain a PEM-encoded block
  
      :param byte_string:
          A byte string to look through
  
      :return:
          A boolean, indicating if a PEM-encoded block is contained in the byte
          string