def ensure_context_attribute_exists(context, name, default_value=None):
 if (not hasattr(context, name)):
  setattr(context, name, default_value)

def ensure_context_attribute_exists ( context , name , default_value = None ) : if ( not hasattr ( context , name ) ) : setattr ( context , name , default_value )
ensure a behave resource exists as attribute in the behave context .