human
Complete this python program:
def main():
assistant
#Here is the Python program you requested.

    """Creates a Metadata object, fetches the default dictionary of
    metadata values, and prints them.
    If --mock was specified on the command line, creates an http server
    for testing.
    """
    query_ip = Metadata._QUERY_IP
    options.parse_command_line()
    if options.options.mock:
        from tornado import testing
        port = testing.get_unused_port()
        class Handler(web.RequestHandler, ):
            def get(self, path):
                self.write(path.split('/')[(-1)])
        application = web.Application([('/(.*)', Handler)])
        application.listen(port)
        query_ip = 'localhost:{0}'.format(port)
    def _MetadataCallback(metadata):
        print metadata
        ioloop.IOLoop.current().stop()
    Metadata(callback=_MetadataCallback, query_ip=query_ip)
    ioloop.IOLoop.current().start()
    return 0