code: def cast(
      source: Union[DataType, str], target: Union[DataType, str], **kwargs
  ) -> DataType:
      
      source, result_target = dtype(source), dtype(target)
  
      if not castable(source, result_target, **kwargs):
          raise com.IbisTypeError(
              'Datatype {} cannot be implicitly '
              'casted to {}'.format(source, result_target)
          )
      return result_target
docs: Attempts to implicitly cast from source dtype to target dtype