Use

    from theano.compat import OrderedDict

This is collections.OrderedDict if available, or a fully compatible port of it in older versions of python. That will let you get rid of the skip_if_no_collections stuff. skip_if_no_collections could be pretty harmful to test coverage since I'm pretty sure collections is not available on Travis CI.