def is_period(array):
 return (isinstance(array, ABCPeriodIndex) or is_period_arraylike(array))

def is_period ( array ) : return ( isinstance ( array , ABCPeriodIndex ) or is_period_arraylike ( array ) )
return if we are a period array .