def __setstate__(self, state):
if isinstance(state, dict):<EOL><INDENT>super().__setstate__(state)<EOL><DEDENT>elif isinstance(state, tuple):<EOL><INDENT>if len(state) == <NUM_LIT:2>:<EOL><INDENT>nd_state, own_state = state<EOL>data = np.empty(nd_state[<NUM_LIT:1>], dtype=nd_state[<NUM_LIT:2>])<EOL>np.ndarray.__setstate__(data, nd_state)<EOL>freq = own_state[<NUM_LIT:1>]<EOL>tz = timezones.tz_standardize(own_state[<NUM_LIT:2>])<EOL>dtype = tz_to_dtype(tz)<EOL>dtarr = DatetimeArray._simple_new(data, freq=freq, dtype=dtype)<EOL>self.name = own_state[<NUM_LIT:0>]<EOL><DEDENT>else:  <EOL><INDENT>data = np.empty(state)<EOL>np.ndarray.__setstate__(data, state)<EOL>dtarr = DatetimeArray(data)<EOL><DEDENT>self._data = dtarr<EOL>self._reset_identity()<EOL><DEDENT>else:<EOL><INDENT>raise Exception("<STR_LIT>")<EOL><DEDENT>
Necessary for making this object picklable