code: def _getSectionIds(self, server, sections):
          
          if not sections: return []
          # Get a list of all section ids for looking up each section.
          allSectionIds = {}
          machineIdentifier = server.machineIdentifier if isinstance(server, PlexServer) else server
          url = self.PLEXSERVERS.replace('{machineId}', machineIdentifier)
          data = self.query(url, self._session.get)
          for elem in data[0]:
              allSectionIds[elem.attrib.get('id', '').lower()] = elem.attrib.get('id')
              allSectionIds[elem.attrib.get('title', '').lower()] = elem.attrib.get('id')
              allSectionIds[elem.attrib.get('key', '').lower()] = elem.attrib.get('id')
          log.debug(allSectionIds)
          # Convert passed in section items to section ids from above lookup
          sectionIds = []
          for section in sections:
              sectionKey = section.key if isinstance(section, LibrarySection) else section
              sectionIds.append(allSectionIds[sectionKey.lower()])
          return sectionIds
docs: Converts a list of section objects or names to sectionIds needed for library sharing.