def load_contract(contracts, default_contracts, mod, name):
    """
    return a Contract object loaded up
    """
    raws = []
    if not contracts:
        return raws
    loaded_contracts = []
    if hasattr(contracts, name):
        loaded_contracts.append(name)
        raws.append(getattr(contracts, name))
    if hasattr(contracts, 'init'):
        loaded_contracts.append('init')
        raws.append(getattr(contracts, 'init'))
    if default_contracts:
        for contract in default_contracts:
            if contract in loaded_contracts:
                continue
            loaded_contracts.append(contract)
            raws.append(getattr(contracts, contract))
    if hasattr(mod, '__contracts__'):
        cnames = getattr(mod, '__contracts__')
        if not isinstance(cnames, (list, tuple)):
            cnames = cnames.split(',')
        for cname in cnames:
            if cname in contracts:
                if cname in loaded_contracts:
                    continue
                loaded_contracts.append(cname)
                raws.append(getattr(contracts, cname))
    return raws
