code: def _cast_to(e, solution, cast_to):
          
          if cast_to is None:
              return solution
  
          if type(solution) is bool:
              if cast_to is bytes:
                  return bytes([int(solution)])
              elif cast_to is int:
                  return int(solution)
          elif type(solution) is float:
              solution = _concrete_value(claripy.FPV(solution, claripy.fp.FSort.from_size(len(e))).raw_to_bv())
  
          if cast_to is bytes:
              if len(e) == 0:
                  return b""
              return binascii.unhexlify('{:x}'.format(solution).zfill(len(e)//4))
  
          if cast_to is not int:
              raise ValueError("cast_to parameter {!r} is not a valid cast target, currently supported are only int and bytes!".format(cast_to))
  
          return solution
docs: Casts a solution for the given expression to type `cast_to`.
  
          :param e: The expression `value` is a solution for
          :param value: The solution to be cast
          :param cast_to: The type `value` should be cast to. Must be one of the currently supported types (bytes|int)
          :raise ValueError: If cast_to is a currently unsupported cast target.
          :return: The value of `solution` cast to type `cast_to`