def METHOD_NAME():
    """ Creates a pipeline configured to use a given model with a specified configuration.
    Notes
    -----
    Pipeline can be executed only if its config contains the following parameters:
    model_class : TorchModel
        Architecture of model. List of available models is defined at 'AVAILABLE_MODELS'.
    model_config : Config
       Model parameters.
    Returns
    -------
    Pipeline
        A pipeline that contains model initialization and training with a given config.
    """
    test_pipeline = (Pipeline()
                     .init_variable('current_loss')
                     .init_model('model', C('model_class'),
                                 'dynamic', C('model_config'))
                     .to_array(dtype='float32')
                     .train_model('model',
                                  inputs=B('images'),
                                  targets=B('labels'),
                                  outputs='loss',
                                  save_to=V('current_loss'))
                     )
    return test_pipeline