def METHOD_NAME(self, param):
    """
    This method is called during the initialization process.
    :param param: parameters from the token init
    :type param: dict
    :return: None
    """
    genkey = is_true(getParam(param, "genkey", optional=True))
    if genkey:
        # Otherwise genkey and otpkey will raise an exception in
        # PasswordTokenClass
        del param["genkey"]
        type_prefix = self.get_class_type()
        length_param = "{0!s}.length".format(type_prefix)
        contents_param = "{0!s}.contents".format(type_prefix)
        if length_param in param:
            size = param[length_param]
            del param[length_param]
        else:
            size = self.otp_len
        if contents_param in param:
            contents = param[contents_param]
            del param[contents_param]
        else:
            contents = self.otp_contents
        param["otpkey"] = _generate_pin_from_policy(contents, size=int(size))
    if "otpkey" in param:
        param["otplen"] = len(param["otpkey"])
    TokenClass.METHOD_NAME(self, param)