code: def _get_manifest_dir(data=None, name=None):
      
      manifest_dir = None
      if data:
          bcbio_system = tz.get_in(["config", "bcbio_system"], data, None)
          bcbio_system = bcbio_system if bcbio_system else data.get("bcbio_system", None)
          if bcbio_system:
              sibling_dir = os.path.normpath(os.path.dirname(bcbio_system))
          else:
              sibling_dir = dd.get_galaxy_dir(data)
          if sibling_dir:
              manifest_dir = os.path.normpath(os.path.join(sibling_dir, os.pardir,
                                                           "manifest"))
      if not manifest_dir or not os.path.exists(manifest_dir):
          manifest_dir = os.path.join(config_utils.get_base_installdir(), "manifest")
          if not os.path.exists(manifest_dir) and name:
              manifest_dir = os.path.join(config_utils.get_base_installdir(name), "manifest")
      return manifest_dir
docs: get manifest directory from the data dictionary, falling back on alternatives
      it prefers, in order:
      1. locating it from the bcbio_system.yaml file
      2. locating it from the galaxy directory
      3. location it from the python executable.
  
      it can accept either the data or config dictionary