def varattsget(self, variable=None, expand=False, to_np=True):
        """
        Gets all variable attributes.

        Unlike attget, which returns a single attribute entry value,
        this function returns all of the variable attribute entries,
        in a dictionary (in the form of 'attribute': value pair) for
        a variable. If there is no entry found, None is returned.
        If no variable name is provided, a list of variables are printed.
        If expand is entered with non-False, then each entry's data
        type is also returned in a list form as [entry, 'CDF_xxxx'].
        For attributes without any entries, they will also return with
        None value.
        """
        if (isinstance(variable, int) and self._num_zvariable > 0 and self._num_rvariable > 0):
            print('This CDF has both r and z variables. Use variable name')
            return None
        if isinstance(variable, str):
            position = self._first_zvariable
            num_variables = self._num_zvariable
            for zVar in [1, 0]:
                for _ in range(0, num_variables):
                    if (self.cdfversion == 3):
                        name, vdr_next = self._read_vdr_fast(position)
                    else:
                        name, vdr_next = self._read_vdr_fast2(position)
                    if name.strip().lower() == variable.strip().lower():
                        if (self.cdfversion == 3):
                            vdr_info = self._read_vdr(position)
                        else:
                            vdr_info = self._read_vdr2(position)
                        return self._read_varatts(vdr_info['variable_number'], zVar, expand, to_np=to_np)
                    position = vdr_next
                position = self._first_rvariable
                num_variables = self._num_rvariable
            print('No variable by this name:', variable)
            return None
        elif isinstance(variable, int):
            if self._num_zvariable > 0:
                num_variable = self._num_zvariable
                zVar = True
            else:
                num_variable = self._num_rvariable
                zVar = False
            if (variable < 0 or variable >= num_variable):
                print('No variable by this number:', variable)
                return None
            return self._read_varatts(variable, zVar, expand, to_np=to_np)
        else:
            print('Please set variable keyword equal to the name or ',
                  'number of an variable')
            rvars, zvars = self._get_varnames()
            print("RVARIABLES: ")
            for x in rvars:
                print("NAME: " + str(x))
            print("ZVARIABLES: ")
            for x in zvars:
                print("NAME: " + str(x))
            return
Gets all variable attributes.

        Unlike attget, which returns a single attribute entry value,
        this function returns all of the variable attribute entries,
        in a dictionary (in the form of 'attribute': value pair) for
        a variable. If there is no entry found, None is returned.
        If no variable name is provided, a list of variables are printed.
        If expand is entered with non-False, then each entry's data
        type is also returned in a list form as [entry, 'CDF_xxxx'].
        For attributes without any entries, they will also return with
        None value.