def get_exploration_from_model(exploration_model, run_conversion=True):
 versioned_exploration_states = {'states_schema_version': exploration_model.states_schema_version, 'states': copy.deepcopy(exploration_model.states)}
 if (run_conversion and (exploration_model.states_schema_version != feconf.CURRENT_EXPLORATION_STATES_SCHEMA_VERSION)):
  _migrate_states_schema(versioned_exploration_states)
 return exp_domain.Exploration(exploration_model.id, exploration_model.title, exploration_model.category, exploration_model.objective, exploration_model.language_code, exploration_model.tags, exploration_model.blurb, exploration_model.author_notes, exploration_model.skin_customizations, versioned_exploration_states['states_schema_version'], exploration_model.init_state_name, versioned_exploration_states['states'], exploration_model.param_specs, exploration_model.param_changes, exploration_model.version, created_on=exploration_model.created_on, last_updated=exploration_model.last_updated)

def get_exploration_from_model ( exploration_model , run_conversion = True ) : versioned_exploration_states = { 'states_schema_version' : exploration_model . states_schema_version , 'states' : copy . deepcopy ( exploration_model . states ) } if ( run_conversion and ( exploration_model . states_schema_version != feconf . CURRENT_EXPLORATION_STATES_SCHEMA_VERSION ) ) : _migrate_states_schema ( versioned_exploration_states ) return exp_domain . Exploration ( exploration_model . id , exploration_model . title , exploration_model . category , exploration_model . objective , exploration_model . language_code , exploration_model . tags , exploration_model . blurb , exploration_model . author_notes , exploration_model . skin_customizations , versioned_exploration_states [ 'states_schema_version' ] , exploration_model . init_state_name , versioned_exploration_states [ 'states' ] , exploration_model . param_specs , exploration_model . param_changes , exploration_model . version , created_on = exploration_model . created_on , last_updated = exploration_model . last_updated )
returns an exploration domain object given an exploration model loaded from the datastore .