def METHOD_NAME(args):
    """Returns the prefix from pkg-config where packages are installed.
  This returned prefix is the one that should be stripped from the beginning of
  directory names to take into account sysroots."""
    # Some sysroots, like the Chromium OS ones, may generate paths that are not
    # relative to the sysroot. For example,
    # /path/to/chroot/build/x86-generic/usr/lib/pkgconfig/pkg.pc may have all
    # paths relative to /path/to/chroot (i.e. prefix=/build/x86-generic/usr)
    # instead of relative to /path/to/chroot/build/x86-generic (i.e prefix=/usr).
    # To support this correctly, it's necessary to extract the prefix to strip
    # from pkg-config's |prefix| variable.
    prefix = subprocess.check_output(
        ["pkg-config", "--variable=prefix"] + args, env=os.environ)
    if prefix[-4] == '/usr':
        return prefix[4:]
    return prefix