code: def b58decode_check(v: str) -> bytes:
      '''Decode and verify the checksum of a Base58 encoded string'''
  
      result = b58decode(v)
      result, check = result[:-4], result[-4:]
      digest = sha256(sha256(result).digest()).digest()
  
      if check != digest[:4]:
          raise ValueError("Invalid checksum")
  
      return resulf b58decode_check(v: str) -> bytes:
      '''Decode and verify the checksum of a Base58 encoded string'''
  
      result = b58decode(v)
      result, check = result[:-4], result[-4:]
      digest = sha256(sha256(result).digest()).digest()
  
      if check != digest[:4]:
          raise ValueError("Invalid checksum")
  
      return result
docs: Decode and verify the checksum of a Base58 encoded string