def DependenciesForEnvironment(self, environment=None):
    required = []
    optional = []
    excluded = []
    for r in self.get('requires', []):
      environments = r['environments']
      if '*' in environments or environment in environments:
        required.append(r)
      elif 'generic' in environments or not environment:
        optional.append(r)
      else:
        excluded.append(r)
    return required, optional, excluded
Returns the list of dependencies for an environment.
dataset/ETHPy150Open google/apis-client-generator/src/googleapis/codegen/targets.py/Features.DependenciesForEnvironment