class_docstr: Determines the number of unique months.
  
  Description:
      Given a list of datetimes, return the number of unique months.
      NUniqueMonths counts absolute month, not month of year, so the
      same month in two different years is treated as different. (i.e.
      Feb 2017 is different than Feb 2019.)
  
  Examples:
      >>> from datetime import datetime
      >>> n_unique_months = NUniqueMonths()
      >>> times = [datetime(2019, 1, 1),
      ...          datetime(2019, 1, 2),
      ...          datetime(2019, 1, 3),
      ...          datetime(2019, 2, 1),
      ...          datetime(2018, 2, 1)]
      >>> n_unique_months(times)
      3
class_docstr_tok: ["Determines","the","number","of","unique","months",".","Description",":","Given","a","list","of","datetimes",",","return","the","number","of","unique","months",".","NUniqueMonths","counts","absolute","month",",","not","month","of","year",",","so","the","same","month","in","two","different","years","is","treated","as","different",".","(","i.e",".","Feb","2017","is","different","than","Feb","2019",".",")","Examples",":",">",">",">","from","datetime","import","datetime",">",">",">","n_unique_months","=","NUniqueMonths","(",")",">",">",">","times","=","[","datetime","(","2019",",","1",",","1",")",",","...","datetime","(","2019",",","1",",","2",")",",","...","datetime","(","2019",",","1",",","3",")",",","...","datetime","(","2019",",","2",",","1",")",",","...","datetime","(","2018",",","2",",","1",")","]",">",">",">","n_unique_months","(","times",")","3"]
code: def get_function(self):
      def n_unique_months(x):
          return x.dt.to_period("M").nunique()
  
      return n_unique_months
  
imports: from woodwork.column_schema import ColumnSchema
  from woodwork.logical_types import Datetime, Integer
  from featuretools.primitives.base import AggregationPrimitive
label_desc: Use image node_id 1 for calling the NUniqueMonths obj's underlying member method code with example usage: obj.get_function() and returns: n_unique_months, x