def get_prepopulated_value(instance, populate_from):
    """
    Returns preliminary value based on `populate_from`.
    """
    if hasattr(populate_from, '__call__'):
        return populate_from(instance)
    attr = getattr(instance, populate_from)
    return callable(attr) and attr() or attr
