def remove_prerequisite(prereq_content_key):
 milestones = milestones_api.get_milestones('{usage_key}{qualifier}'.format(usage_key=prereq_content_key, qualifier=GATING_NAMESPACE_QUALIFIER))
 for milestone in milestones:
  milestones_api.remove_milestone(milestone.get('id'))

def remove_prerequisite ( prereq_content_key ) : milestones = milestones_api . get_milestones ( '{usage_key}{qualifier}' . format ( usage_key = prereq_content_key , qualifier = GATING_NAMESPACE_QUALIFIER ) ) for milestone in milestones : milestones_api . remove_milestone ( milestone . get ( 'id' ) )
removes the milestone and coursecontentmilestones related to the gating prerequisite which the given course content fulfills arguments: prereq_content_key : the prerequisite content usage key returns: none .