@staticmethod<EOL><INDENT>def _filter_extras(dm):<DEDENT>
for extra in list(filter(None, dm)):<EOL><INDENT>new_extra = extra<EOL>reqs = dm.pop(extra)<EOL>new_extra, _, marker = extra.partition('<STR_LIT::>')<EOL>fails_marker = marker and (<EOL>invalid_marker(marker)<EOL>or not evaluate_marker(marker)<EOL>)<EOL>if fails_marker:<EOL><INDENT>reqs = []<EOL><DEDENT>new_extra = safe_extra(new_extra) or None<EOL>dm.setdefault(new_extra, []).extend(reqs)<EOL><DEDENT>return dm<EOL>
Given a mapping of extras to dependencies, strip off
environment markers and filter out any dependencies
not matching the markers.