def is_offsetlike(arr_or_obj):
if isinstance(arr_or_obj, ABCDateOffset):<EOL><INDENT>return True<EOL><DEDENT>elif (is_list_like(arr_or_obj) and len(arr_or_obj) and<EOL>is_object_dtype(arr_or_obj)):<EOL><INDENT>return all(isinstance(x, ABCDateOffset) for x in arr_or_obj)<EOL><DEDENT>return False<EOL>
Check if obj or all elements of list-like is DateOffset

Parameters
----------
arr_or_obj : object

Returns
-------
boolean
    Whether the object is a DateOffset or listlike of DatetOffsets

Examples
--------
>>> is_offsetlike(pd.DateOffset(days=1))
True
>>> is_offsetlike('offset')
False
>>> is_offsetlike([pd.offsets.Minute(4), pd.offsets.MonthEnd()])
True
>>> is_offsetlike(np.array([pd.DateOffset(months=3), pd.Timestamp.now()]))
False