def modelcontext(model):
 if (model is None):
  return Model.get_context()
 return model

def modelcontext ( model ) : if ( model is None ) : return Model . get_context ( ) return model
return the given model or try to find it in the context if there was none supplied .