code: def _set_attributes(self, response, attribute_dict):
          
          status_code = response.get(
              'HTTPStatusCode',
              response['ResponseMetadata']['HTTPStatusCode']
          )
          if status_code == 200:
              for k, v in attribute_dict.items():
                  setattr(self, k, v)
docs: Set user attributes based on response code
          :param response: HTTP response from Cognito
          :attribute dict: Dictionary of attribute name and values