<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_uo_type(obj_type, comm_keys_provided=True, app_keys_provided=True):
 """ Constructs UO type from the operation and keys provided, clears bits set ib obj_type before unless None is specified to the given parameters. :param obj_type: :param comm_keys_provided: :param app_keys_provided: :return: """

        if comm_keys_provided is not None and comm_keys_provided == False:
            obj_type &= ~(int(1) << TemplateFields.FLAG_COMM_GEN)
        elif comm_keys_provided:
            obj_type |= (int(1) << TemplateFields.FLAG_COMM_GEN)

        if app_keys_provided is not None and app_keys_provided == False:
            obj_type &= ~(int(1) << TemplateFields.FLAG_APP_GEN)
        elif app_keys_provided:
            obj_type |= (int(1) << TemplateFields.FLAG_APP_GEN)

        return obj_type