code: def from_sec(class_, sec):
          
          public_pair = sec_to_public_pair(sec, class_._generator)
          return class_(public_pair=public_pair, is_compressed=is_sec_compressed(sec))
docs: Create a key from an sec bytestream (which is an encoding of a public pair).