code: def _fill_data(values: dict):
      if values.get("data") is not None:
          return values
      if "filename" not in values:
          raise ValueError()
      try:
          with open(Path(values["filename"]).expanduser()) as f:
              values["data"] = f.read()
      except OSError:
          raise ValueError(f"No such file {values['filename']}")
      return values
  
imports: from pathlib import Path
  from typing import List, Literal, Optional, Union
  import yaml
  from pydantic import BaseModel, Field, root_validator
  from sqlalchemy.ext.asyncio import AsyncSession
  from typing_extensions import Annotated
  from dstack._internal.core.models.backends import AnyConfigInfoWithCreds
  from dstack._internal.core.models.backends.aws import AnyAWSCreds
  from dstack._internal.core.models.backends.azure import AnyAzureCreds
  from dstack._internal.core.models.backends.base import BackendType
  from dstack._internal.core.models.backends.datacrunch import AnyDataCrunchCreds
  from dstack._internal.core.models.backends.lambdalabs import AnyLambdaCreds
  from dstack._internal.core.models.backends.tensordock import AnyTensorDockCreds
  from dstack._internal.core.models.backends.vastai import AnyVastAICreds
  from dstack._internal.core.models.common import ForbidExtra
  from dstack._internal.server import settings
  from dstack._internal.server.models import ProjectModel
  from dstack._internal.server.services import backends
  from dstack._internal.server.services import projects
  from dstack._internal.server.utils.common import run_async
  from dstack._internal.utils.logging import get_logger
label_desc: Use image node_id 3 for calling a global function with example usage: _fill_data(values) and returns: values, values