code: def deserialize(cls, target_class, array):
          
  
          session_server = target_class.__new__(target_class)
          session_server.__dict__ = {
              cls._ATTRIBUTE_ID: converter.deserialize(
                  core.Id,
                  array[cls._INDEX_ID][cls._FIELD_ID]
              ),
              cls._ATTRIBUTE_TOKEN: converter.deserialize(
                  core.SessionToken,
                  array[cls._INDEX_TOKEN][cls._FIELD_TOKEN]
              ),
              cls._ATTRIBUTE_USER_COMPANY: None,
              cls._ATTRIBUTE_USER_PERSON: None,
          }
  
          user_dict_wrapped = array[cls._INDEX_USER]
  
          if cls._FIELD_USER_COMPANY in user_dict_wrapped:
              session_server.__dict__[cls._ATTRIBUTE_USER_COMPANY] = \
                  converter.deserialize(
                      endpoint.UserCompany,
                      user_dict_wrapped[cls._FIELD_USER_COMPANY]
                  )
          elif cls._FIELD_USER_PERSON in user_dict_wrapped:
              session_server.__dict__[cls._ATTRIBUTE_USER_PERSON] = \
                  converter.deserialize(
                      endpoint.UserPerson,
                      user_dict_wrapped[cls._FIELD_USER_PERSON]
                  )
          elif cls._FIELD_USER_API_KEY in user_dict_wrapped:
              session_server.__dict__[cls._ATTRIBUTE_USER_API_KEY] = \
              converter.deserialize(
                  endpoint.UserApiKey,
                  user_dict_wrapped[cls._FIELD_USER_API_KEY]
              )
          else:
              raise BunqException(cls._ERROR_COULD_NOT_DETERMINE_USER)
  
          return session_server
docs: :type target_class: core.SessionServer|type
          :type array: list
  
          :rtype: core.SessionServer