code: def _vals_to_series(instance_vals, column_id):
      """
      instance_vals may be a pd.Dataframe, a pd.Series, a list, a single
      value, or None. This function always returns a Series or None.
      """
      if instance_vals is None:
          return None
  
      # If this is a single value, make it a list
      if not hasattr(instance_vals, "__iter__"):
          instance_vals = [instance_vals]
  
      # convert iterable to pd.Series
      if isinstance(instance_vals, pd.DataFrame):
          out_vals = instance_vals[column_id]
      elif is_instance(instance_vals, (pd, dd, ps), "Series"):
          out_vals = instance_vals.rename(column_id)
      else:
          out_vals = pd.Series(instance_vals)
  
      # no duplicates or NaN values
      out_vals = out_vals.drop_duplicates().dropna()
  
      # want index to have no name for the merge in query_by_values
      out_vals.index.name = None
  
      return out_vals
  
imports: import copy
  import logging
  import warnings
  from collections import defaultdict
  import numpy
  import pandas
  from woodwork import init_series
  from woodwork.logical_types import Datetime, LatLong
  from featuretools.entityset import deserialize, serialize
  from featuretools.entityset.relationship import Relationship, RelationshipPath
  from featuretools.feature_base.feature_base import _ES_REF
  from featuretools.utils.gen_utils import Library, import_or_none, is_instance
  from featuretools.utils.plot_utils import check_graphviz, get_graphviz_format, save_graph
  from featuretools.utils.wrangle import _check_timedelta
label_desc: Use image node_id 1 for calling a global function with example usage: _vals_to_series(instance_vals, column_id) and returns: out_vals, None