code: def from_vineyard(df, vineyard_socket=None):
      if vineyard is not None and isinstance(
          df, vineyard.Object
      ):  # pragma: no cover
          if "vineyard::GlobalDataFrame" not in df.typename:
              raise TypeError(
                  "The input dataframe %r is not a vineyard' GlobalDataFrame"
                  % df
              )
          object_id = df.id
      else:
          object_id = df
      if vineyard is not None and isinstance(
          object_id, vineyard.ObjectID
      ):
          object_id = repr(object_id)
      metaop = DataFrameFromVineyard(
          vineyard_socket=vineyard_socket,
          object_id=object_id,
          dtype=np.dtype("byte"),
          gpu=None,
      )
      meta = metaop(
          shape=(np.nan, np.nan),
          dtypes=pd.Series([]),
          index_value=parse_index(pd.Index([])),
          columns_value=parse_index(pd.Index([])),
      )
      op = DataFrameFromVineyardChunk(
          vineyard_socket=vineyard_socket, object_id=object_id, gpu=None
      )
      return op(meta)
  
imports: import numpy
  import pandas
  from ...None import opcodes
  from ...core import OutputType
  from ...core.context import get_context
  from ...serialization.serializables import Int32Field, StringField
  from ...tensor.datasource.from_vineyard import resolve_vineyard_socket
  from ...utils import calc_nsplits, has_unknown_shape, lazy_import
  from ..operands import DataFrameOperand, DataFrameOperandMixin
  from ..utils import parse_index
label_desc: Use image node_id 1 for calling a global function with example usage: from_vineyard(df, vineyard_socket) and returns: op