<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sampleLocationFromFeature(self, feature):
 """ Samples a location from one specific feature. This is only supported with three dimensions. """

    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))