<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_datetime_arraylike(arr):
 """ Check whether an array-like is a datetime array-like or DatetimeIndex. Parameters arr : array-like The array-like to check. Returns ------- boolean Whether or not the array-like is a datetime array-like or DatetimeIndex. Examples -------- False False True """


    if isinstance(arr, ABCDatetimeIndex):
        return True
    elif isinstance(arr, (np.ndarray, ABCSeries)):
        return (is_object_dtype(arr.dtype)
                and lib.infer_dtype(arr, skipna=False) == 'datetime')
    return getattr(arr, 'inferred_type', None) == 'datetime'