def coord_to_dimension(coord):
kwargs = {}<EOL>if coord.units.is_time_reference():<EOL><INDENT>kwargs['<STR_LIT>'] = get_date_format(coord)<EOL><DEDENT>else:<EOL><INDENT>kwargs['<STR_LIT>'] = str(coord.units)<EOL><DEDENT>return Dimension(coord.name(), **kwargs)<EOL>
Converts an iris coordinate to a HoloViews dimension.