code: def _month_conditional(time, months):
      
      if isinstance(months, (int, str)):
          months_array = month_indices(months)
      else:
          months_array = months
      cond = False
      for month in months_array:
          cond |= (time['{}.month'.format(TIME_STR)] == month)
      return cond
docs: Create a conditional statement for selecting data in a DataArray.
  
      Parameters
      ----------
      time : xarray.DataArray
           Array of times for which to subsample for specific months.
      months : int, str, or xarray.DataArray of times
          If int or str, passed to `month_indices`
      Returns
      -------
      Array of bools specifying which months to keep
  
      See Also
      --------
      month_indices