def _hashtable_algo(f, values, return_dtype=None):
 dtype = values.dtype
 if is_float_dtype(dtype):
  return f(htable.Float64HashTable, _ensure_float64)
 elif is_signed_integer_dtype(dtype):
  return f(htable.Int64HashTable, _ensure_int64)
 elif is_unsigned_integer_dtype(dtype):
  return f(htable.UInt64HashTable, _ensure_uint64)
 elif is_datetime64_dtype(dtype):
  return_dtype = (return_dtype or 'M8[ns]')
  return f(htable.Int64HashTable, _ensure_int64).view(return_dtype)
 elif is_timedelta64_dtype(dtype):
  return_dtype = (return_dtype or 'm8[ns]')
  return f(htable.Int64HashTable, _ensure_int64).view(return_dtype)
 if (lib.infer_dtype(values) in ['string']):
  return f(htable.StringHashTable, _ensure_object)
 return f(htable.PyObjectHashTable, _ensure_object)

def _hashtable_algo ( f , values , return_dtype = None ) : dtype = values . dtype if is_float_dtype ( dtype ) : return f ( htable . Float64HashTable , _ensure_float64 ) elif is_signed_integer_dtype ( dtype ) : return f ( htable . Int64HashTable , _ensure_int64 ) elif is_unsigned_integer_dtype ( dtype ) : return f ( htable . UInt64HashTable , _ensure_uint64 ) elif is_datetime64_dtype ( dtype ) : return_dtype = ( return_dtype or 'M8[ns]' ) return f ( htable . Int64HashTable , _ensure_int64 ) . view ( return_dtype ) elif is_timedelta64_dtype ( dtype ) : return_dtype = ( return_dtype or 'm8[ns]' ) return f ( htable . Int64HashTable , _ensure_int64 ) . view ( return_dtype ) if ( lib . infer_dtype ( values ) in [ 'string' ] ) : return f ( htable . StringHashTable , _ensure_object ) return f ( htable . PyObjectHashTable , _ensure_object )
f -> result .