def get_click_file_name(click_file):
    """ Return click_file.name, falling back to <stdin> if the .name attribute is missing. """
    try:
        return click_file.name
    except Exception:  # For unit testing: simulated stdin stream has no .name attrib
        return "<stdin>"