human
I wrote the below code

    not_found = object()
    def extract(k):
        if pop:
            if must_have:
                return dict_.pop(k)
            return dict_.pop(k, not_found)
        if must_have:
            return dict_[k]
        return dict_.get(k, not_found)
    result = [(key, extract(key)) for key in keys]
    return OrderedDict([(k, v) for (k, v) in result if (v is not not_found)])

What's a good function header?

=====
Here's a good function header?
assistant
#Here's a good function header.

def dict_subset(dict_, keys, pop=False, must_have=True):