def is_period_arraylike(arr):
 if isinstance(arr, ABCPeriodIndex):
  return True
 elif isinstance(arr, (np.ndarray, ABCSeries)):
  return ((arr.dtype == object) and (lib.infer_dtype(arr) == 'period'))
 return (getattr(arr, 'inferred_type', None) == 'period')

def is_period_arraylike ( arr ) : if isinstance ( arr , ABCPeriodIndex ) : return True elif isinstance ( arr , ( np . ndarray , ABCSeries ) ) : return ( ( arr . dtype == object ) and ( lib . infer_dtype ( arr ) == 'period' ) ) return ( getattr ( arr , 'inferred_type' , None ) == 'period' )
return if we are period arraylike / periodindex .