57) -> Union[D, V]:
58 """Get item from a package name lookup mapping with a resolver identifier.
59
60 This extra logic is needed when the target mapping is keyed by package
61 name, which cannot be directly looked up with an identifier (which may
62 contain requested extras). Additional logic is added to also look up a value
63 by "cleaning up" the extras from the identifier.
64 """
65 if identifier in mapping:
66 return mapping[identifier]
67
68
69
70
71
73 if open_bracket and name in mapping:
74 return mapping[name]
75 return default
76
77