def _should_validate_sub_attributes(attribute, sub_attr):
 validate = attribute.get('validate')
 return (validate and isinstance(sub_attr, collections.Iterable) and any([(k.startswith('type:dict') and v) for (k, v) in six.iteritems(validate)]))

def _should_validate_sub_attributes ( attribute , sub_attr ) : validate = attribute . get ( 'validate' ) return ( validate and isinstance ( sub_attr , collections . Iterable ) and any ( [ ( k . startswith ( 'type:dict' ) and v ) for ( k , v ) in six . iteritems ( validate ) ] ) )
verify that sub-attributes are iterable and should be validated .