def METHOD_NAME(attach_id):
    """Return attachment with input identifier."""
    for atch in attachments:
        if atch.ident == attach_id:
            return atch
    raise ValidationError(f"No attachment for attach_id {attach_id} in formats")