code: def _get_attribute(self, attribute, name):
          
          try:
              if attribute is None:
                  attribute = self._attribute_file_open( name )
              else:
                  attribute.seek(0)
              return attribute, attribute.read().strip().decode()
          except Exception as ex:
              self._raise_friendly_access_error(ex, name)
docs: Device attribute getter