def _extract_path(srcs):
    """Takes the first label in srcs and returns its target name.

    Args:
      srcs: a collection of build labels of the form "//package/name:target"

    Returns:
      The first element's target (i.e.- the part after the ":"), else None if empty.
    """

    for s in srcs:
        toks = s.split(":")
        if len(toks) == 2:
            return toks[1]
    return None