def _find_required_chars(block_range, full_coverage_required, exceptions):
 chars_defined_in_block = _defined_characters_in_range(block_range)
 if full_coverage_required:
  return chars_defined_in_block
 else:
  if (not exceptions):
   return set()
  if exceptions.startswith(_EXCEPTION_STARTER):
   exceptions = exceptions[len(_EXCEPTION_STARTER):]
   chars_to_exclude = _multiple_range_string_to_set(exceptions)
   return (chars_defined_in_block - chars_to_exclude)
  else:
   chars_to_limit_to = _multiple_range_string_to_set(exceptions)
   return (chars_defined_in_block & chars_to_limit_to)

def _find_required_chars ( block_range , full_coverage_required , exceptions ) : chars_defined_in_block = _defined_characters_in_range ( block_range ) if full_coverage_required : return chars_defined_in_block else : if ( not exceptions ) : return set ( ) if exceptions . startswith ( _EXCEPTION_STARTER ) : exceptions = exceptions [ len ( _EXCEPTION_STARTER ) : ] chars_to_exclude = _multiple_range_string_to_set ( exceptions ) return ( chars_defined_in_block - chars_to_exclude ) else : chars_to_limit_to = _multiple_range_string_to_set ( exceptions ) return ( chars_defined_in_block & chars_to_limit_to )
finds required coverage based on a row of the spreadsheet .