code: def get_package_by_type(self, package_type, mask=None):
          
          packages = self.get_packages_of_type([package_type], mask)
          if len(packages) == 0:
              return None
          else:
              return packages.pop()
docs: Get a single package of a given type.
  
          Syntactic sugar to retrieve a single package of a given type.
          If multiple packages share the given type, this will return the first
          one returned by the API.
          If no packages are found, returns None
  
          :param string package_type: representing the package type key name we are interested in