def METHOD_NAME(identifier: str):
    for process in get_processes():
        process_identifier = (
            getattr(process, 'identifier', None) or type(process).__name__
        )
        if process_identifier == identifier:
            return process
    raise NoSuchProcessError(identifier)