def _ValidateAFF4Type(aff4_type):
 if (aff4_type is None):
  return None
 if (not isinstance(aff4_type, type)):
  raise TypeError(('aff4_type=%s must be a type' % aff4_type))
 if (not issubclass(aff4_type, AFF4Object)):
  raise TypeError(('aff4_type=%s must be a subclass of AFF4Object.' % aff4_type))
 return aff4_type

def _ValidateAFF4Type ( aff4_type ) : if ( aff4_type is None ) : return None if ( not isinstance ( aff4_type , type ) ) : raise TypeError ( ( 'aff4_type=%s must be a type' % aff4_type ) ) if ( not issubclass ( aff4_type , AFF4Object ) ) : raise TypeError ( ( 'aff4_type=%s must be a subclass of AFF4Object.' % aff4_type ) ) return aff4_type
validates and normalizes aff4_type to class object .