def body_quopri_len(str):
 count = 0
 for c in str:
  if bqre.match(c):
   count += 3
  else:
   count += 1
 return count

def body_quopri_len ( str ) : count = 0 for c in str : if bqre . match ( c ) : count += 3 else : count += 1 return count
return the length of str when it is encoded with body quopri .