parameters: (self, vtypes, groupby=False)
return_statement: return params_map
docstring: get distributed vars by conditions.
  
          Args:
              vtype(str|None): distributed var's vtype, such as "Optimizer", "RemotePrefetch"
              groupby(bool|False): group by origin var or not.
  
          Returns:
              list: distributed var list.
              dict: distributed var map when groupby=True
docstring_summary: get distributed vars by conditions.
docstring_tokens: get distributed vars by conditions .
function: def get_distributed_vars_by_vtypes(self, vtypes, groupby=False):
          """
          get distributed vars by conditions.
  
          Args:
              vtype(str|None): distributed var's vtype, such as "Optimizer", "RemotePrefetch"
              groupby(bool|False): group by origin var or not.
  
          Returns:
              list: distributed var list.
              dict: distributed var map when groupby=True
          """
          vtype_vars = []
          for var in self.distributed_vars:
              if var.vtype in vtypes:
                  vtype_vars.append(var)
          if not groupby:
              return vtype_vars
  
          params_map = {}
          for var in vtype_vars:
              origin_var_name = var.origin.name
  
              if origin_var_name in params_map.keys():
                  optimizers = params_map.get(origin_var_name)
              else:
                  optimizers = []
              optimizers.append(var)
              params_map[origin_var_name] = optimizers
          return params_map
function_tokens: def get_distributed_vars_by_vtypes ( self , vtypes , groupby = False ) : vtype_vars = [ ] for var in self . distributed_vars : if var . vtype in vtypes : vtype_vars . append ( var ) if not groupby : return vtype_vars params_map = { } for var in vtype_vars : origin_var_name = var . origin . name if origin_var_name in params_map . keys ( ) : optimizers = params_map . get ( origin_var_name ) else : optimizers = [ ] optimizers . append ( var ) params_map [ origin_var_name ] = optimizers return params_map