def get_module_for_descriptor_internal(user, descriptor, student_data, course_id, track_function, xqueue_callback_url_prefix, request_token, position=None, wrap_xmodule_display=True, grade_bucket_type=None, static_asset_path='', user_location=None, disable_staff_debug_info=False, course=None):
 (system, student_data) = get_module_system_for_user(user=user, student_data=student_data, descriptor=descriptor, course_id=course_id, track_function=track_function, xqueue_callback_url_prefix=xqueue_callback_url_prefix, position=position, wrap_xmodule_display=wrap_xmodule_display, grade_bucket_type=grade_bucket_type, static_asset_path=static_asset_path, user_location=user_location, request_token=request_token, disable_staff_debug_info=disable_staff_debug_info, course=course)
 descriptor.bind_for_student(system, user.id, [partial(OverrideFieldData.wrap, user, course), partial(LmsFieldData, student_data=student_data)])
 descriptor.scope_ids = descriptor.scope_ids._replace(user_id=user.id)
 user_needs_access_check = (getattr(user, 'known', True) and (not isinstance(user, SystemUser)))
 if user_needs_access_check:
  if (not has_access(user, 'load', descriptor, course_id)):
   return None
 return descriptor

def get_module_for_descriptor_internal ( user , descriptor , student_data , course_id , track_function , xqueue_callback_url_prefix , request_token , position = None , wrap_xmodule_display = True , grade_bucket_type = None , static_asset_path = '' , user_location = None , disable_staff_debug_info = False , course = None ) : ( system , student_data ) = get_module_system_for_user ( user = user , student_data = student_data , descriptor = descriptor , course_id = course_id , track_function = track_function , xqueue_callback_url_prefix = xqueue_callback_url_prefix , position = position , wrap_xmodule_display = wrap_xmodule_display , grade_bucket_type = grade_bucket_type , static_asset_path = static_asset_path , user_location = user_location , request_token = request_token , disable_staff_debug_info = disable_staff_debug_info , course = course ) descriptor . bind_for_student ( system , user . id , [ partial ( OverrideFieldData . wrap , user , course ) , partial ( LmsFieldData , student_data = student_data ) ] ) descriptor . scope_ids = descriptor . scope_ids . _replace ( user_id = user . id ) user_needs_access_check = ( getattr ( user , 'known' , True ) and ( not isinstance ( user , SystemUser ) ) ) if user_needs_access_check : if ( not has_access ( user , 'load' , descriptor , course_id ) ) : return None return descriptor
actually implement get_module .