def Mandatory(cls, **_kwargs):
 kwargs = dict(min_occurs=1, nillable=False)
 if (cls.get_type_name() is not cls.Empty):
  kwargs['type_name'] = ('%s%s%s' % (const.MANDATORY_PREFIX, cls.get_type_name(), const.MANDATORY_SUFFIX))
 kwargs.update(_kwargs)
 if issubclass(cls, Unicode):
  kwargs.update(dict(min_len=1))
 elif issubclass(cls, Array):
  ((k, v),) = cls._type_info.items()
  if (v.Attributes.min_occurs == 0):
   cls._type_info[k] = Mandatory(v)
 return cls.customize(**kwargs)

def Mandatory ( cls , ** _kwargs ) : kwargs = dict ( min_occurs = 1 , nillable = False ) if ( cls . get_type_name ( ) is not cls . Empty ) : kwargs [ 'type_name' ] = ( '%s%s%s' % ( const . MANDATORY_PREFIX , cls . get_type_name ( ) , const . MANDATORY_SUFFIX ) ) kwargs . update ( _kwargs ) if issubclass ( cls , Unicode ) : kwargs . update ( dict ( min_len = 1 ) ) elif issubclass ( cls , Array ) : ( ( k , v ) , ) = cls . _type_info . items ( ) if ( v . Attributes . min_occurs == 0 ) : cls . _type_info [ k ] = Mandatory ( v ) return cls . customize ( ** kwargs )
customizes the given type to be a mandatory one .