<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def hex2pub(pub_hex: str) -> PublicKey: """ Convert ethereum hex to EllipticCurvePublicKey The hex should be 65 bytes, but ethereum public key only has 64 bytes So have to add \x04 Parameters pub_hex: str Ethereum public key hex string Returns ------- coincurve.PublicKey A secp256k1 public key calculated from ethereum public key hex string True True """

    uncompressed = decode_hex(pub_hex)
    if len(uncompressed) == 64:
        uncompressed = b"\x04" + uncompressed

    return PublicKey(uncompressed)