code: def get_attributes(self, name_list):
          
          properties = {}
          for name in name_list:
              value = self.get_attribute(name)
              if value is not None:
                  properties[name] = value
          return properties
docs: Get Attributes
  
          Get a list of attributes as a name/value dictionary.
  
          :param name_list:
              A list of attribute names (strings).
          :return:
              A name/value dictionary (both names and values are strings).