<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_fk_widget(cls, field):
 """ Prepare widget for fk and o2o fields """

        return functools.partial(
            widgets.ForeignKeyWidget,
            model=get_related_model(field))