code: def _table_arg_to_table_ref(value, default_project=None):
      
      if isinstance(value, six.string_types):
          value = TableReference.from_string(value, default_project=default_project)
      if isinstance(value, (Table, TableListItem)):
          value = value.reference
      return value
docs: Helper to convert a string or Table to TableReference.
  
      This function keeps TableReference and other kinds of objects unchanged.