<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def EncodeForCSV(x):
  "Encodes one value for CSV."
  k = x.encode('utf-8')
  if ',' in k or '"' in k:
    return '"%s"' % k.replace('"', '""')
  else:
    return k