code: def sampleLocationFromFeature(self, feature):
      
      if feature == "face":
        return self._sampleFromFaces()
      elif feature == "edge":
        return self._sampleFromEdges()
      elif feature == "vertex":
        return self._sampleFromVertices()
      elif feature == "random":
        return self.sampleLocation()
      else:
        raise NameError("No such feature in {}: {}".format(self, feature))
docs: Samples a location from one specific feature.
  
      This is only supported with three dimensions.