def _get_resource_tag(resource_type, tag, runtime, chip, resource_id=None):
    """
    Get resource tag by resource type.

    IMPORTANT:
        resource_id is optional to enable calling this method before the training resource has been created
        resource_tag will be incomplete (missing resource_id appended to the end) when resource_id is NOT supplied

    :param resource_type:   Type of resource (job, function, model, stream) - currently not used but here to enable generic method
    :param tag:             User defined tag for the resource
    :param runtime:         Runtime used to serve the resource  Valid values: python, tfserving, tflight
    :param chip:            Type of hardware chip used to server the resource
    :param resource_id:     (optional) Id that uniquely identifies the trained resource

    :return:                resource tag
    """
    resource_tag = tag + runtime + chip
    if resource_id:
        resource_tag += resource_id
    return resource_tag
