def raise_if_custom_resource_class_pre_v1_1(rc):
 if isinstance(rc, six.string_types):
  if (rc not in fields.ResourceClass.V1_0):
   raise ValueError
 else:
  try:
   fields.ResourceClass.V1_0[rc]
  except IndexError:
   raise ValueError

def raise_if_custom_resource_class_pre_v1_1 ( rc ) : if isinstance ( rc , six . string_types ) : if ( rc not in fields . ResourceClass . V1_0 ) : raise ValueError else : try : fields . ResourceClass . V1_0 [ rc ] except IndexError : raise ValueError
raises valueerror if the supplied resource class identifier is *not* in the set of standard resource classes as of inventory/allocation object version 1 .