original_docstring: 
          The states arg is a list of strings.
          Returns an appropriate subquery.
          
docstring: The states arg is a list of strings.
  Returns an appropriate subquery.
docstring_tokens: The states arg is a list of strings . Returns an appropriate subquery .
code: def _query_jobstate_for_instance(self, states):
          """
          The states arg is a list of strings.
          Returns an appropriate subquery.
          """
          q = self.session.query(Jobstate.job_instance_id)
          q = q.filter(Jobstate.job_instance_id == JobInstance.job_instance_id).correlate(
              JobInstance
          )
          q = q.filter(Jobstate.state.in_(states)).subquery()
          return q
code_tokens: def _query_jobstate_for_instance ( self , states ) : q = self . session . query ( Jobstate . job_instance_id ) q = q . filter ( Jobstate . job_instance_id == JobInstance . job_instance_id ) . correlate ( JobInstance ) q = q . filter ( Jobstate . state . in_ ( states ) ) . subquery ( ) return q
short_docstring: The states arg is a list of strings.
short_docstring_tokens: The states arg is a list of strings .
comment: """
          The states arg is a list of strings.
          Returns an appropriate subquery.
          """