<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ncVarAttributes(ncVar):
 """ Returns the attributes of ncdf variable """

    try:
        return ncVar.__dict__
    except Exception as ex:
        # Due to some internal error netCDF4 may raise an AttributeError or KeyError,
        # depending on its version.
        logger.warn("Unable to read the attributes from {}. Reason: {}"
                    .format(ncVar.name, ex))
        return {}