<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_file(campaign_file, **kwargs):
 """Load campaign from YAML file :return: memory representation of the YAML file :rtype: dictionary """

    realpath = osp.realpath(campaign_file)
    if osp.isdir(realpath):
        campaign_file = osp.join(campaign_file, YAML_CAMPAIGN_FILE)
    campaign = Configuration.from_file(campaign_file)
    return default_campaign(campaign, **kwargs)