import re


def normaliseDeimsID(deims_id):
    """Extract standardised DEIMS.ID suffix from input string.

    'deims_id' is the only, mandatory argument and must be a valid
    DEIMS.ID.

    Returns a string of the form '00000000-0000-0000-0000-000000000000'
    or raises a RuntimeError if no DEIMS.ID suffix is found.
    """
    # extract ID from lowercased string via regex
    # returns the first match only
    normalised_deims_id = re.search(r"([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})",deims_id.lower())
    if normalised_deims_id:
        return normalised_deims_id.group(1)
    else:
        raise RuntimeError("no ID found")