def get_prefix(requested, keys=None):
    """Return existing prefix or None.

    :param requested: Request string. i.e. novacell0_username
    :type requested: str
    :param keys: Keys to determine prefix. Defaults set in function.
    :type keys: List of str keys
    :returns: String prefix i.e. novacell0
    :rtype: Union[None, str]
    """
    if keys is None:
        # Shared-DB default keys
        keys = ["_database", "_username", "_hostname"]
    for key in keys:
        if requested.endswith(key):
            return requested[:-len(key)]