title: How to get PipelineOptions in composite PTransform in Beam 2.0?
body: <p>After upgrading to Beam 2.0 the <code>Pipeline</code> class doesn't have <code>getOptions()</code> class anymore.
  I have a composite <code>PTransform</code> that relies on getting the options in the its <code>expand</code> method:</p>
  
  <pre><code>public class MyCompositeTransform extends PTransform&lt;PBegin, PDone&gt; {
      @Override
      public PDone expand(PBegin input) {
          Pipeline pipeline = input.getPipeline();
          MyPipelineOptions options = pipeline.getOptions().as(MyPipelineOptions.class);
          ...
      }
  }
  </code></pre>
  
  <p>In Beam 2.0 there doesn't seem to be a way to access the <code>PipelineOptions</code> at all  in the <code>expand</code> method.</p>
  
  <p>What's the alternative?</p>