code: def register(self, username, password, attr_map=None):
          
          attributes = self.base_attributes.copy()
          if self.custom_attributes:
              attributes.update(self.custom_attributes)
          cognito_attributes = dict_to_cognito(attributes, attr_map)
          params = {
              'ClientId': self.client_id,
              'Username': username,
              'Password': password,
              'UserAttributes': cognito_attributes
          }
          self._add_secret_hash(params, 'SecretHash')
          response = self.client.sign_up(**params)
  
          attributes.update(username=username, password=password)
          self._set_attributes(response, attributes)
  
          response.pop('ResponseMetadata')
          return response
docs: Register the user. Other base attributes from AWS Cognito User Pools
          are  address, birthdate, email, family_name (last name), gender,
          given_name (first name), locale, middle_name, name, nickname,
          phone_number, picture, preferred_username, profile, zoneinfo,
          updated at, website
          :param username: User Pool username
          :param password: User Pool password
          :param attr_map: Attribute map to Cognito's attributes
          :return response: Response from Cognito
  
          Example response::
          {
              'UserConfirmed': True|False,
              'CodeDeliveryDetails': {
                  'Destination': 'string', # This value will be obfuscated
                  'DeliveryMedium': 'SMS'|'EMAIL',
                  'AttributeName': 'string'
              }
          }