code: def stream_reader_statements(stream_arn):
      
      action_type = get_stream_action_type(stream_arn)
      arn_parts = stream_arn.split("/")
      # Cut off the last bit and replace it with a wildcard
      wildcard_arn_parts = arn_parts[:-1]
      wildcard_arn_parts.append("*")
      wildcard_arn = "/".join(wildcard_arn_parts)
  
      return [
          Statement(
              Effect=Allow,
              Resource=[stream_arn],
              Action=[
                  action_type("DescribeStream"),
                  action_type("GetRecords"),
                  action_type("GetShardIterator"),
              ]
          ),
          Statement(
              Effect=Allow,
              Resource=[wildcard_arn],
              Action=[action_type("ListStreams")]
          )
      ]
docs: Returns statements to allow Lambda to read from a stream.
  
      Handles both DynamoDB & Kinesis streams. Automatically figures out the
      type of stream, and provides the correct actions from the supplied Arn.
  
      Arg:
          stream_arn (str): A kinesis or dynamodb stream arn.
  
      Returns:
          list: A list of statements.