code: def generate_pb_config(pb_id: str,
                         pb_config: dict = None,
                         workflow_config: dict = None) -> dict:
      
      if workflow_config is None:
          workflow_config = dict()
      if pb_config is None:
          pb_config = dict()
      pb_type = pb_config.get('type', choice(PB_TYPES))
      workflow_id = workflow_config.get('id')
      if workflow_id is None:
          if pb_type == 'offline':
              workflow_id = choice(OFFLINE_WORKFLOWS)
          else:
              workflow_id = choice(REALTIME_WORKFLOWS)
      workflow_version = workflow_config.get('version', generate_version())
      workflow_parameters = workflow_config.get('parameters', dict())
      pb_data = dict(
          id=pb_id,
          version=__pb_version__,
          type=pb_type,
          priority=pb_config.get('priority', randint(0, 10)),
          dependencies=pb_config.get('dependencies', []),
          resources_required=pb_config.get('resources_required', []),
          workflow=dict(
              id=workflow_id,
              version=workflow_version,
              parameters=workflow_parameters
          )
      )
      return pb_data
docs: Generate a PB configuration dictionary.
  
      Args:
          pb_id (str): Processing Block Id
          pb_config (dict, optional) PB configuration.
          workflow_config (dict, optional): Workflow configuration
  
      Returns:
          dict, PB configuration dictionary.