<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def convertafield(field_comm, field_val, field_iddname):
 """convert field based on field info in IDD"""

    convinidd = ConvInIDD()
    field_typ = field_comm.get('type', [None])[0]    
    conv = convinidd.conv_dict().get(field_typ, convinidd.no_type)
    return conv(field_val, field_iddname)