code: def _copy_stream_position(position):
      
      if isinstance(position, types.StreamPosition):
          output = types.StreamPosition()
          output.CopyFrom(position)
          return output
  
      return types.StreamPosition(**position)
docs: Copy a StreamPosition.
  
      Args:
          position (Union[ \
              dict, \
              ~google.cloud.bigquery_storage_v1beta1.types.StreamPosition \
          ]):
              StreamPostion (or dictionary in StreamPosition format) to copy.
  
      Returns:
          ~google.cloud.bigquery_storage_v1beta1.types.StreamPosition:
              A copy of the input StreamPostion.