code: def get_stream_action_type(stream_arn):
      
  
      stream_type_map = {
          "kinesis": awacs.kinesis.Action,
          "dynamodb": awacs.dynamodb.Action,
      }
  
      stream_type = stream_arn.split(":")[2]
      try:
          return stream_type_map[stream_type]
      except KeyError:
          raise ValueError(
              "Invalid stream type '%s' in arn '%s'" % (stream_type, stream_arn)
          )
docs: Returns the awacs Action for a stream type given an arn
  
      Args:
          stream_arn (str): The Arn of the stream.
  
      Returns:
          :class:`awacs.aws.Action`: The appropriate stream type awacs Action
              class
  
      Raises:
          ValueError: If the stream type doesn't match kinesis or dynamodb.