<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_partition():
 """ check the defined partition """

    
    all_index           = walk_data(sess, oid_hrStorageIndex, helper)[0]
    all_descriptions    = walk_data(sess, oid_hrStorageDescr, helper)[0]
    # we need the sucess flag for the error handling (partition found or not found)
    sucess              = False

    # here we zip all index and descriptions to have a list like
    # [('Physical memory', '1'), ('Virtual memory', '3'), ('/', '32'), ('/proc/xen', '33')]
    zipped = zip(all_index, all_descriptions)
    
    for partition in zipped:
        index       = partition[0]
        description = partition[1]
        
        if partition_found(disk, description):
            # we found the partition
            sucess = True

            # receive all values we need
            unit    =   float(get_data(sess, oid_hrStorageAllocationUnits + "." + index, helper))
            size    =   float(get_data(sess, oid_hrStorageSize + "." + index, helper))
            used    =   float(get_data(sess, oid_hrStorageUsed + "." + index, helper))

            if size == 0 or used == 0:
                # if the host return "0" as used or size, then we have a problem with the calculation (devision by zero)
                helper.exit(summary="Received value 0 as StorageSize or StorageUsed: calculation error", exit_code=unknown, perfdata='')

            # calculate the real size (size*unit) and convert the results to the target unit the user wants to see
            used_result     = convert_to_XX(calculate_real_size(used), unit, targetunit)
            size_result     = convert_to_XX(calculate_real_size(size), unit, targetunit)
            
            # calculation of the used percentage
            percent_used    = used_result / size_result * 100
            
            # we need a string and want only two decimals
            used_string     = str(float("{0:.2f}".format(used_result)))
            size_string     = str(float("{0:.2f}".format(size_result)))
            percent_string  = str(float("{0:.2f}".format(percent_used)))
            
            if percent_used < 0 or percent_used > 100:
                # just a validation that percent_used is not smaller then 0% or lager then 100%                
                helper.exit(summary="Calculation error - second counter overrun?", exit_code=unknown, perfdata='')                   
            
            # show the summary
            helper.add_summary("%s%% used (%s%s of %s%s) at '%s'" % (percent_string, used_string, targetunit, size_string, targetunit, description))
            # add the metric in percent. 
            helper.add_metric(label='percent used',value=percent_string, min="0", max="100", uom="%")
                    
    else:
        if not sucess:
            # if the partition was not found in the data output, we return an error
            helper.exit(summary="Partition '%s' not found" % disk, exit_code=unknown, perfdata='')