code: def private_key_to_address(private_key: Union[str, bytes]) -> ChecksumAddress:
      
      if isinstance(private_key, str):
          private_key_bytes = to_bytes(hexstr=private_key)
      else:
          private_key_bytes = private_key
      pk = PrivateKey(private_key_bytes)
      return public_key_to_address(pk.public_key)
docs: Converts a private key to an Ethereum address.