def _parse_valid_types_from_validator(validator):
 if (not isinstance(validator, list)):
  return anglicize_json_type(validator)
 if (len(validator) == 1):
  return anglicize_json_type(validator[0])
 return u'{}, or {}'.format(u', '.join(([anglicize_json_type(validator[0])] + validator[1:(-1)])), anglicize_json_type(validator[(-1)]))

def _parse_valid_types_from_validator ( validator ) : if ( not isinstance ( validator , list ) ) : return anglicize_json_type ( validator ) if ( len ( validator ) == 1 ) : return anglicize_json_type ( validator [ 0 ] ) return u'{}, or {}' . format ( u', ' . join ( ( [ anglicize_json_type ( validator [ 0 ] ) ] + validator [ 1 : ( - 1 ) ] ) ) , anglicize_json_type ( validator [ ( - 1 ) ] ) )
a validator value can be either an array of valid types or a string of a valid type .