<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_file):
 """ Returns the name and shape information of input and output tensors of the given ONNX model file. Notes ----- This method is available when you ``import mxnet.contrib.onnx`` Parameters model_file : str ONNX model file name Returns ------- model_metadata : dict A dictionary object mapping various metadata to its corresponding value. The dictionary will have the following template:: 'input_tensor_data' : list of tuples representing the shape of the input paramters 'output_tensor_data' : list of tuples representing the shape of the output of the model """

    graph = GraphProto()

    try:
        import onnx
    except ImportError:
        raise ImportError("Onnx and protobuf need to be installed. "
                          + "Instructions to install - https://github.com/onnx/onnx")
    model_proto = onnx.load_model(model_file)
    metadata = graph.get_graph_metadata(model_proto.graph)
    return metadata