def usage_key_with_run(usage_key_string):
 usage_key = UsageKey.from_string(usage_key_string)
 usage_key = usage_key.replace(course_key=modulestore().fill_in_run(usage_key.course_key))
 return usage_key

def usage_key_with_run ( usage_key_string ) : usage_key = UsageKey . from_string ( usage_key_string ) usage_key = usage_key . replace ( course_key = modulestore ( ) . fill_in_run ( usage_key . course_key ) ) return usage_key
converts usage_key_string to a usagekey .