if not name: return elif name.isdigit(): idx = int(name) - 1 if idx >= 0 and idx < len(names): return names[idx] return name