def full_label(lbl):
    """Converts a label to full format, e.g. //a/b/c -> //a/b/c:c.

    If the label is already in full format, it returns it as it is, otherwise
    appends the folder name as the target name.

    Args:
      lbl: The label to convert to full format.

    Returns:
      The label in full format, or the original input if it was already in full
      format.
    """
    if lbl.find(":") != -1:
        return lbl
    target_name = lbl.rpartition("/")[-1]
    return lbl + ":" + target_name