<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_model_metadata(model_class, metadata, version=None):
 """ Returns user-defined metadata, making sure information all models should have is also available, as a dictionary """

    from turicreate import __version__
    info = {
        'turicreate_version': __version__,
        'type': model_class,
    }
    if version is not None:
        info['version'] = str(version)
    info.update(metadata)
    return info