<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def com_google_fonts_check_code_pages(ttFont):
 """Check code page character ranges"""


  if not hasattr(ttFont['OS/2'], "ulCodePageRange1") or \
     not hasattr(ttFont['OS/2'], "ulCodePageRange2") or \
     (ttFont['OS/2'].ulCodePageRange1 == 0 and \
      ttFont['OS/2'].ulCodePageRange2 == 0):
    yield FAIL, ("No code pages defined in the OS/2 table"
                 " ulCodePageRage1 and CodePageRage2 fields.")
  else:
    yield PASS, "At least one code page is defined."