code: def _assert_in_buildroot(self, filepath):
      
      filepath = os.path.normpath(filepath)
      root = get_buildroot()
      if not os.path.abspath(filepath) == filepath:
        # If not absolute, assume relative to the build root.
        return os.path.join(root, filepath)
      else:
        if '..' in os.path.relpath(filepath, root).split(os.path.sep):
          # The path wasn't in the buildroot. This is an error because it violates the pants being
          # hermetic.
          raise ValueError('Received a file_option that was not inside the build root:\n'
                           '  file_option: {filepath}\n'
                           '  build_root:  {buildroot}\n'
                           .format(filepath=filepath, buildroot=root))
        return filepath
docs: Raises an error if the given filepath isn't in the buildroot.
  
      Returns the normalized, absolute form of the path.